From owner-freebsd-current@freebsd.org Mon Jul 13 15:29:43 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B292599B42E for ; Mon, 13 Jul 2015 15:29:43 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-lb0-x236.google.com (mail-lb0-x236.google.com [IPv6:2a00:1450:4010:c04::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3751DE1D; Mon, 13 Jul 2015 15:29:43 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by lbbyj8 with SMTP id yj8so42251389lbb.0; Mon, 13 Jul 2015 08:29:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=M5HinyPUvfKUIh7pCIZ8MQuXZfarD3oI1BvrHqL0z1s=; b=adNzs3W8AMyz051L/1F6E3Z50pSXXglqkAHRzUmjCX1He6XrLHmAw+APUTshGF3ctB t5MdshO1iVzrM5gNY5e271uMwUAFZqEBdW08Flox0S9e53TOQJJYcDWPmi1DR25Mri16 fDvQGAUsJaw47m0MWNW5Dy2KXY9V3rBu4zlvIf7NM6Ie3R4dUKVaj2sQ3w5H8OimVT+H Am4qJGA/j0f40n67Xw7N1TA5q+e5MY2pV/17LucVUmpT0+yiEGWIvFZs1zeMXbGyD6y3 OSQlcNGonc+TjnobdqQqknjNF7ITdrFsKk6ETwoiBcC5f24qUJBY8EOue9U4Iwo6g1n5 dEFw== X-Received: by 10.112.157.100 with SMTP id wl4mr32970587lbb.20.1436801380835; Mon, 13 Jul 2015 08:29:40 -0700 (PDT) Received: from mavbook.mavhome.dp.ua ([91.198.175.1]) by smtp.googlemail.com with ESMTPSA id w7sm4817785lag.42.2015.07.13.08.29.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Jul 2015 08:29:39 -0700 (PDT) Sender: Alexander Motin Message-ID: <55A3D960.5000704@FreeBSD.org> Date: Mon, 13 Jul 2015 18:29:36 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Kohji Okuno CC: freebsd-current@freebsd.org, ken Subject: Re: Why shoud we cause panic in scsi_da.c? References: <20150709.150520.1823457260978955949.okuno.kohji@jp.panasonic.com> <20150713.171110.531869520391748650.okuno.kohji@jp.panasonic.com> <55A37933.3000802@selasky.org> <20150713.175143.290106286605820529.okuno.kohji@jp.panasonic.com> In-Reply-To: <20150713.175143.290106286605820529.okuno.kohji@jp.panasonic.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2015 15:29:43 -0000 Hi. On 13.07.2015 11:51, Kohji Okuno wrote: >> On 07/13/15 10:11, Kohji Okuno wrote: >>> Could you comment on my quesion? >>> >>>> I found panic() in scsi_da.c. Please find the following. >>>> I think we should return with error without panic(). >>>> What do you think about this? >>>> >>>> scsi_da.c: >>>> 3018 } else if (bp != NULL) { >>>> 3019 if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) >>>> 3020 panic("REQ_CMP with QFRZN"); >>>> >> >> It looks to me more like an KASSERT() is appropriate here. As I can see, this panic() call was added by ken@ about 15 years ago. I've added him to CC in case he has some idea why it was done. From my personal opinion I don't see much reasons to allow CAM_DEV_QFRZN to be returned only together with error. While is may have little sense in case of successful command completion, I don't think it should be treated as error. Simply removing this panic is probably a bad idea, since if it happens device will just remain frozen forever, that will be will be difficult to diagnose, but I would better just dropped device freeze in that case same as in case of completion with error. -- Alexander Motin