From owner-freebsd-scsi@FreeBSD.ORG Thu Dec 13 17:37:03 2007 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA67916A418; Thu, 13 Dec 2007 17:37:03 +0000 (UTC) (envelope-from sbruno@miralink.com) Received: from plato.miralink.com (mail.miralink.com [70.103.185.20]) by mx1.freebsd.org (Postfix) with ESMTP id 8F41713C45B; Thu, 13 Dec 2007 17:37:03 +0000 (UTC) (envelope-from sbruno@miralink.com) Received: from localhost (localhost.localdomain [127.0.0.1]) by plato.miralink.com (Postfix) with ESMTP id 2891A61B15C; Thu, 13 Dec 2007 09:37:03 -0800 (PST) Received: from plato.miralink.com ([127.0.0.1]) by localhost (plato.miralink.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 24668-02; Thu, 13 Dec 2007 09:36:57 -0800 (PST) Received: from iago.office.miralink.com (iago.office.miralink.com [10.0.0.40]) by plato.miralink.com (Postfix) with ESMTP id C7BB761B14C; Thu, 13 Dec 2007 09:36:57 -0800 (PST) Message-ID: <47616DB9.3070100@miralink.com> Date: Thu, 13 Dec 2007 09:36:57 -0800 From: Sean Bruno User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: Scott Long References: <1197420795.2738.6.camel@iago.office.miralink.com> <86sl28snpe.wl%simokawa@FreeBSD.ORG> <1197425759.14437.0.camel@home-desk> <626eb4530712111837y4608e919w845461d36a18118f@mail.gmail.com> <475F5669.1010800@miralink.com> <47605645.70509@samsco.org> In-Reply-To: <47605645.70509@samsco.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Thu Dec 13 09:36:58 2007 X-DSPAM-Confidence: 0.9997 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 47616dba15041109565483 X-DSPAM-Factors: 27, X-Virus-Scanned: amavisd-new at X-Spam-Status: No, score=-4.499 tagged_above=-10 required=6.6 autolearn=ham tests=[ALL_TRUSTED=-1.8, BAYES_00=-2.599, DSPAM_HAM=-0.1] X-Spam-Score: -4.499 X-Spam-Level: Cc: nate@root.org, freebsd-firewire@freebsd.org, freebsd-scsi@freebsd.org Subject: Re: scsi_target witness lock error X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2007 17:37:04 -0000 Scott Long wrote: > Sean Bruno wrote: >> Hidetoshi Shimokawa wrote: >>> On 12/12/07, Sean Bruno wrote: >>> >>>>> --- //depot/vendor/freebsd/src/sys/cam/scsi/scsi_target.c >>>>> 2007/04/15 08:53:22 >>>>> +++ >>>>> //depot/user/simokawa/firewire_lock/sys/cam/scsi/scsi_target.c >>>>> 2007/05/21 14:31:55 >>>>> @@ -372,10 +372,14 @@ >>>>> int retval; >>>>> >>>>> softc = (struct targ_softc *)kn->kn_hook; >>>>> +#if 0 >>>>> cam_periph_lock(softc->periph); >>>>> +#endif >>>>> retval = !TAILQ_EMPTY(&softc->user_ccb_queue) || >>>>> !TAILQ_EMPTY(&softc->abort_queue); >>>>> +#if 0 >>>>> cam_periph_unlock(softc->periph); >>>>> +#endif >>>>> return (retval); >>>>> } >>>>> >>>> Are these two "if 0"'s supposed to be commented out? I'm leaving this >>>> out of my RELENG_6 test for now unless you say otherwise. >>>> >>>> >>>> Sean >>>> >>> >>> Yes, it is same as comment out. >>> The patch was for RELENG_7 or current. I'm not sure about RELENG_6. >>> >>> >> Ok, I merged the patch(RELENG_6) to the best of my ability. The >> system now panics and has the same witness error. >> >> panic/witness/trace --> http://consultcsg.com/scsitarget_witness.txt >> scsi_target.c diff --> http://consultcsg.com/scsi_target.c.diff >> > > CAM locking in RELENG_6 is completely different from locking in > RELENG_7. I'm not saying that your problems are imaginary, just > pointing out that any problems in 6.x are going to almost certainly > be completely different from problems in 7.x. I'll look at both. > > Scott Scott: Thanks. Let me know when/if you would like some testing/debugging with your updates. Sean