From owner-freebsd-scsi@FreeBSD.ORG Sat Jun 5 07:32:12 2010 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 DDFED1065688 for ; Sat, 5 Jun 2010 07:32:12 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 658D58FC14 for ; Sat, 5 Jun 2010 07:32:12 +0000 (UTC) Received: by fxm20 with SMTP id 20so1217576fxm.13 for ; Sat, 05 Jun 2010 00:32:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=mU1jAENgxD1vi77iTJpcGPcPCRmSYtbjs8p1SvarkTY=; b=TPMVpxUlINT//1VkfVM5uhn9Fx0B/4rtlUHvdJb+LWyRIW6VMgpgtgI+cVt7k3OJaD Cf+ooUVfrAI2NKDz/i5Yq9drHgF8yz5/enSpnSzHT8kv+IqkfJ/9aHZG0KOqcWFKCgWS tmAxc1vX5vtKPVjD8zN7XiEJs+KQSzk+wwn+U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=I5ffdnU6tu7OvcFbmww4C7mHhnULy8eovsc+8rIo+j25wbrCGsv7eAbRrAFFG/ZWlT GgTTLlVst7qRHXIrQ7TsqgHqXK+qpFOwwEdQpyNGSF9QJSoTpU9anfWBCm1MBns3Wnr3 q+7bxQyIMq60SX/OpymiXog8IhMBEsRsiaM4c= Received: by 10.223.144.79 with SMTP id y15mr624099fau.22.1275723131184; Sat, 05 Jun 2010 00:32:11 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 13sm9153739fad.7.2010.06.05.00.32.10 (version=SSLv3 cipher=RC4-MD5); Sat, 05 Jun 2010 00:32:10 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C09FD65.9010406@FreeBSD.org> Date: Sat, 05 Jun 2010 10:31:49 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.24 (X11/20100402) MIME-Version: 1.0 To: Matthew Jacob , freebsd-scsi@freebsd.org References: In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Re: report luns (plus some CAM_DEBUG changes) 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: Sat, 05 Jun 2010 07:32:12 -0000 Matthew Jacob wrote: > I'm ready to push this I think. Comments before I do? > > See http://people.freebsd.org/~mjacob/active_patches Some comments in order of appearance: - removing blank line from xpt_acquire_device() violates style(9). - wouldn't "debug" sounded better the "dflags" in sysctl? - is there reason to check CAM_DEV_INQUIRY_DATA_VALID in PROBE_REPORT_LUNS? - in PROBE_REPORT_LUNS you are incrementing target->refcount. But who will decrement it back, if XPT_SCAN_LUN was called directly, without XPT_SCAN_BUS/TGT? - while target is probably also counted by scan request and is not going to disappear, do you think direct manipulation with target->refcount (especially decrement) is a good policy? - if xpt_create_path() or something else fails, I think you may leak target->refcount. -- Alexander Motin