From owner-freebsd-scsi@freebsd.org Tue Nov 24 08:21:36 2015 Return-Path: Delivered-To: freebsd-scsi@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 8CC37A36086 for ; Tue, 24 Nov 2015 08:21:36 +0000 (UTC) (envelope-from honzhan@microsoft.com) Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0109.outbound.protection.outlook.com [207.46.100.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4396F1A31 for ; Tue, 24 Nov 2015 08:21:35 +0000 (UTC) (envelope-from honzhan@microsoft.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=JeIfMoFNohOhPtn0ivIz2p57ezvt4ZvyUOieZ3J4ryY=; b=K9v3Jx4rSPVJfC0HyQgMtRkfNR/UXBPgXfhjsgPu8SpxDK3sC9umGzWVFZ1fG0b2d82H1icp2pjsu/dVkXUOKvDYThfY7VPs7u2K8f7M5tXVAuFPRbufFRvHucOwKOr5ERKSfUPdjT6hZw0vIG+9JvcwybCV62edCz7YgrSRNa0= Received: from BY2PR03CA005.namprd03.prod.outlook.com (10.255.93.22) by BY1PR03MB1388.namprd03.prod.outlook.com (10.162.127.142) with Microsoft SMTP Server (TLS) id 15.1.331.20; Tue, 24 Nov 2015 08:21:26 +0000 Received: from BN1AFFO11FD043.protection.gbl (10.255.93.4) by BY2PR03CA005.outlook.office365.com (10.255.93.22) with Microsoft SMTP Server (TLS) id 15.1.331.20 via Frontend Transport; Tue, 24 Nov 2015 08:21:26 +0000 Authentication-Results: spf=pass (sender IP is 206.191.228.180) smtp.mailfrom=microsoft.com; freebsd.org; dkim=none (message not signed) header.d=none;freebsd.org; dmarc=pass action=none header.from=microsoft.com; Received-SPF: Pass (protection.outlook.com: domain of microsoft.com designates 206.191.228.180 as permitted sender) receiver=protection.outlook.com; client-ip=206.191.228.180; helo=064-smtp-out.microsoft.com; Received: from 064-smtp-out.microsoft.com (206.191.228.180) by BN1AFFO11FD043.mail.protection.outlook.com (10.58.52.190) with Microsoft SMTP Server (TLS) id 15.1.331.11 via Frontend Transport; Tue, 24 Nov 2015 08:21:23 +0000 Received: from SG2PR3002MB0106.064d.mgd.msft.net (141.251.56.18) by SG2PR3002MB0106.064d.mgd.msft.net (141.251.56.18) with Microsoft SMTP Server (TLS) id 15.1.337.9; Tue, 24 Nov 2015 08:21:02 +0000 Received: from SG2PR3002MB0106.064d.mgd.msft.net ([141.251.56.18]) by SG2PR3002MB0106.064d.mgd.msft.net ([141.251.56.18]) with mapi id 15.01.0337.009; Tue, 24 Nov 2015 08:21:02 +0000 From: Hongjiang Zhang To: "freebsd-scsi@freebsd.org" Subject: A lot of invalid SCSI hard disks were listed under /dev/ad Thread-Topic: A lot of invalid SCSI hard disks were listed under /dev/ad Thread-Index: AdEmeKaD3jSWUTS+S/ifPLXIbCQw5w== Date: Tue, 24 Nov 2015 08:21:02 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [141.251.57.5] MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD043; 1:F+nWUGyApXzopZn20OXA/6CAC6X6oLmb03n8ScRn8pw7+iIInCCVZUdxgb63NQ7+nWfqK6+hl9iNhm3wXEkm9eIcxKzvq+eNTqBK/EEN72egU46dL/3wS+Ns82xHKzWwO8Q9cwXR0OTsPI2aNAIWJL8Iv6uTxPz+Z6srUbRE4dDj2S3gmcUsW/8l1NNZahwsHOWSTb77NInMUd0n/bCur7jkq4ng03F727YgZLdrPKnUL4XyUtXu/VbGBFiuc6pzR/NkgcAEafNTQziRgx790S9LkuG03nGg/HK7lCI2ejFvMpdPEIzQ6RNKARYxO47AWaApIidGeybaWRLOIXhlHU20SBACJ32aJaf5MAqRLW4= X-Forefront-Antispam-Report: CIP:206.191.228.180; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(438002)(189002)(199003)(87936001)(5004730100002)(229853001)(512954002)(108616004)(106466001)(84326002)(5007970100001)(11100500001)(450100001)(10290500002)(86612001)(10400500002)(86146001)(16236675004)(5005710100001)(586003)(10090500001)(2900100001)(33646002)(5003600100002)(66066001)(16796002)(110136002)(300700001)(107886002)(2351001)(5001920100001)(92566002)(19580395003)(5890100001)(2501003)(54356999)(189998001)(19625215002)(5008740100001)(15975445007)(6116002)(19580405001)(260700001)(50986999)(19300405004)(790700001)(102836003)(5001960100002)(86362001)(81156007)(97736004)(6806005)(69596002)(3846002)(24736003); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR03MB1388; H:064-smtp-out.microsoft.com; FPR:; SPF:Pass; PTR:ErrorRetry; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1388; 2:a3NzcSFJPAI70MC2+ZB0U0ACT5tkVdj1tnkOjzANqLozxnf+JzGR2Ziq6Uho5RJXGfwxyJnv0LINbZ3vwIF1GPuWSxfcPUiqqK1qNzrKr+X69QN3GV460vMuu9puRtL0r2At8D/NqeVOhpHTV1MWOg==; 3:dCPj9iVhDBMdBzWnoWafhNnlQBcSQ6u8vRcjWmDz0Tz4YebQnok9wmV3sF5TvMhQp95UYlRx89Q9hRL7wfwvKiWoR1W3MX6P6KSnLhpRCOsHMIJp1MLUjKNXg9bN3DwsGsa8NE2zszl6/n1uLgL8lRa3My/ywukpJiFIR1Ehbp2xwXiPr0ObQDsfobid5+dVMcd9aKz3s5JplQvIXJ7C4TyZkHDcw6lnRf2jDmMFrCri7q5tABREVeBZAu6pw5UVBayzK/VexdeKiFSNunVJdg==; 25:EIimRABKPQzOubEPwCFb3tPH2tHtfgN4viIYOJ23+yt2tMIYMz4H9yhFDLi9grY/0pH1SO4bYXfXx8ULVxR8+d5QOw87Vadp5GvGMBYKXQDQLS4Kk3ucG4feWsBsmHl8ebP8Qiq9AT28b2jlCtsIf/AxO1yKVM7lPwihggf2jyLiWnHivMnx0JRnSWLwJSCXg+lP790xRM6g2JXJvyMJinnjp+7N5XF9kzoxZbFPhDjCBxjbpSUcCI180ZoYqKUBagfdu8ZcakSUfqo3dIBmVQ== X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501001); SRVR:BY1PR03MB1388; X-O365EOP-Header: O365_EOP: AllowList from IP - set SCL to -1 X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1388; 20:7ZiLLy4AymvzACm65J6IsAHyLZM+Y4k253LKM3fW1kipFerOsIm5qPbJHf1d6Njc5iInnk56PY1UQM80EcTDQtyUsj+NKo1wwjffeOUjLH4wJnOOCQBf85lT+h4BkXLz8dE9IrmPqyT7G5jkM/vukP5/xka7rLIjhu6ToBD87jNzoujfsrIdeorlTW+rhc3GCD7CqxvknlNFRsIjsAYwf8ZAfzQxZ63nxLF8uDUL3OS0I2KqVYCwtHasVfvyvYslAZhKh0uENmyoVZSuT39EhDw4Jk5er/a74iEEmX8sHjE56a/Atn+KcDBsnCMekmQRUBbcb2lqEgubICguHCK/aH3znciEIxlxCGEPoaONPHUzv9KdPXppZnVjtMcOd+sNDlu3JJPXnmApyjI/CQw0p4zRhDvUfhYYYk7AZUavBghGgPjyGjEZNb6TYNV0bDBv9kKtKk9fE+MZK0pRpQgbyREjm+zEMATM4Ru7sATDzsCVT8fIWt0/3SgTxNNHrAqtuzbwFK3AYXcyfIIpkr19cRYYWG5SPTpD0smVuAIlnIZEhvLGjxSBdX50i2R0fh3J0uD8gocZr9VZ3RdHJNFzravaPFGVuXEa/7CeMJuI+gU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(108003899814671); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(61425024)(601004)(2401047)(5005006)(520078)(8121501046)(3002001)(10201501046)(61426024)(61427024); SRVR:BY1PR03MB1388; BCL:0; PCL:0; RULEID:; SRVR:BY1PR03MB1388; X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1388; 4:tFv6gEJeY+gpTfEWdiguM2ByrQvcmvMC9Gpiz5w03a1T+qN1zXDjGdn5ea6cq8H8KkLX2k1tjeerfspioEolyU95ZEarWyk3rGeukMK9rmVyweFzmWVN0sho6wedURaX++KYWUqVaLtVQsL8KAgNoNiTGCj2uWGC/mhnXwM3iTvhcOLm3osFwRpM38iCqveMdwj7P8skaTcnm8MkhvkF0PvCh08LSzpLhzvXJ5fGyfqK+RNMci+0zvPhr7Vfip063R22Ca3LF6ReoIwuNMtFN8bUoYGLlj9r5LWXg9JsY6rH7X1Up0cuperKf6OiHNog+zjDsnhCMCWkewQWsYdOOM+8l62QcoJ0oOLii1VjmzOx/YA73tsLjd/XrshrwsODsYv0fkxSRF9hu5Leu634lwYsh1qvalJshQ/RoMgRnWXdiAypB722YcydNd4hdsStTWQ3DAjQNJFqaHUciau/DrO6Rp1iGXWYTNH7sHeGGRyiaFLJHLisFgfilKQaOkzI X-Forefront-PRVS: 0770F75EA9 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR03MB1388; 23:rPEz4f/BKvv6dijyo/yf+Dqy2VpY7n/zTVbJ2F/mM?= =?us-ascii?Q?avCNAH/ILSIPsDMdQQBNxYipBe31p9+euA3IcLkF8nYo8EYfO1MsFFaXV0gR?= =?us-ascii?Q?TnNB1/rcdZ28x9ALrPyrNJHl+5JGSiKWkjShknH6PM2dtGkRfaP2Oms2Q/h8?= =?us-ascii?Q?jitbfy9IiJT6unRf42psEaNgPA1McktMndRWeX1/Y3V6Ar4hkpLsD+NkFngs?= =?us-ascii?Q?67jLalcCaAYtftPuwLsBhdj9r/Bx9FNy/8S4smjLLEOjA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VXJj25DRftwqNkakOSo35gG1+lW0/Es/LY8hEWW4EuFysT+?= =?us-ascii?Q?YkCHrbcOOzswXtMMFhh41QwFxCX5XIVX/SsGcKPWQYpGAZIg5lnZTHDfQetr?= =?us-ascii?Q?deQ2SSCkyU/p1K8OCAouPLa5sslYnyJcB91Xni2x/NxNPmJYQVUBlMoGxk4S?= =?us-ascii?Q?WjV/qlmTX2gfYtm0x1zuqwTLC0f6Sikb4p694iXzKDEOpKOZmOBoMQrlP4AI?= =?us-ascii?Q?guGVMiQZO/QJIuym928eJHf1PxGm9LQq9mDw/w9Sn2TN0gX45awfQl7CLFxl?= =?us-ascii?Q?GZsQe6cdm+akq8S0eEWuLE/DRT8Vk1K3/klJw7wTOlobFdjB3OPZRpcPpOhb?= =?us-ascii?Q?lwel9EmdBEDjzPsZUSlEtVlG4XBMFf2Re4=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1388; 5:ozyN3xBTx5hP/9m2bPlWo9guvKdy12FkU2f1JdijCHpxlo8Mr00Cted5XD1CvudI+ZnBI8IwMWbyRHYJe8+VaQPW02kf923VPL9ChACGV8eUKB1VpNHT6dSe85+2GaziWx5wNsslSPR6+twClGbjKA==; 24:imdUrE8tzjonD95OIAIM6obmgqPwthlaqKAOhMEmy+NP1b8Bn4RvdCh0NGRRkPJ49wK5i0upZyOcugA9CqlwKOExr8A8nO+n0iaJlLAZYb8= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Nov 2015 08:21:23.1824 (UTC) X-MS-Exchange-CrossTenant-Id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=72f988bf-86f1-41af-91ab-2d7cd011db47; Ip=[206.191.228.180]; Helo=[064-smtp-out.microsoft.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR03MB1388 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 08:21:36 -0000 I installed FreeBSD 10.2 on Windows 10, and found there are quite a lot of = invalid hard disk under /dev/. "camcontrol devlist" also lists those invali= d disk. See the following. But FreeBSD installed on windows 8, there is no = such confusing information. >From the "dmesg", I observed there are a lot non-existing SCSI disks, and o= nly da1 is the real disk. It looks like "lun" number is wrong, I want to understand the logic of hype= r-v for storage, but I have no idea of how to use cam_*** API. From the cod= e, the logic is extracted as follows. But I don't know how to use cam_** or= xpt_** API. Does anyone know how can I get help? Or shall I ask such questions in other= maillist? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dsource= code logic in **_attach() function=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D struct cam_devq *devq =3D cam_simq_alloc(); sc->hs_sim =3D cam_sim_alloc(storvsc_action, storvsc_poll, sc->hs_drv_props->drv_name, sc, sc->hs_unit, &sc->hs_lock, 1, sc->hs_drv_props->drv_max_ios_per_target, devq); xpt_bus_register(sc->hs_sim, dev, 0); if (xpt_create_path(&sc->hs_path, /*periph*/NULL, cam_sim_path(sc->hs_sim), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) !=3D CAM_REQ_CMP) { xpt_bus_deregister(cam_sim_path(sc->hs_sim)); cam_sim_free(sc->hs_sim, /*free_devq*/TRUE); xpt_bus_deregister(cam_sim_path(sc->hs= _sim)); } =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D/dev/da*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D root@honzhan-dev2:/usr/src # ll /dev/da* crw-r----- 1 root operator 0x5f Nov 23 18:45 /dev/da0 crw-r----- 1 root operator 0x60 Nov 23 18:45 /dev/da1 crw-r----- 1 root operator 0x69 Nov 23 18:45 /dev/da10 crw-r----- 1 root operator 0x6a Nov 23 18:45 /dev/da11 crw-r----- 1 root operator 0x6b Nov 23 18:45 /dev/da12 crw-r----- 1 root operator 0x6c Nov 23 18:45 /dev/da13 crw-r----- 1 root operator 0x6d Nov 23 18:45 /dev/da14 crw-r----- 1 root operator 0x6e Nov 23 18:45 /dev/da15 crw-r----- 1 root operator 0x70 Nov 23 18:45 /dev/da1p1 crw-r----- 1 root operator 0x71 Nov 23 18:45 /dev/da1p2 crw-r----- 1 root operator 0x72 Nov 23 18:45 /dev/da1p3 crw-r----- 1 root operator 0x61 Nov 23 18:45 /dev/da2 crw-r----- 1 root operator 0x62 Nov 23 18:45 /dev/da3 crw-r----- 1 root operator 0x63 Nov 23 18:45 /dev/da4 crw-r----- 1 root operator 0x64 Nov 23 18:45 /dev/da5 crw-r----- 1 root operator 0x65 Nov 23 18:45 /dev/da6 crw-r----- 1 root operator 0x66 Nov 23 18:45 /dev/da7 crw-r----- 1 root operator 0x67 Nov 23 18:45 /dev/da8 crw-r----- 1 root operator 0x68 Nov 23 18:45 /dev/da9 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dcamcon= trol devlist=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D root@honzhan-dev2:/usr/src # camcontrol devlist at scbus0 target 0 lun 0 (cd0,pass0) at scbus1 target 0 lun 0 (da1,pass2) < > at scbus1 target 1 lun 1 (da0,pass1) < > at scbus2 target 0 lun 1 (da2,pass3) < > at scbus2 target 0 lun 2 (da4,pass5) < > at scbus2 target 0 lun 3 (da6,pass7) < > at scbus2 target 0 lun 4 (da8,pass9) < > at scbus2 target 0 lun 5 (da10,pass11) < > at scbus2 target 0 lun 6 (da12,pass13) < > at scbus2 target 0 lun 7 (da14,pass15) < > at scbus2 target 1 lun 1 (da3,pass4) < > at scbus2 target 1 lun 2 (da5,pass6) < > at scbus2 target 1 lun 3 (da7,pass8) < > at scbus2 target 1 lun 4 (da9,pass10) < > at scbus2 target 1 lun 5 (da11,pass12) < > at scbus2 target 1 lun 6 (da13,pass14) < > at scbus2 target 1 lun 7 (da15,pass16) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Ddmesg=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D da0 at blkvsc0 bus 0 scbus1 target 1 lun 1 da0: < > Fixed Direct Access SCSI device da0: 300.000MB/s transfers da0: 0MB (0 512 byte sectors: 0H 0S/T 0C) da0: Delete methods: da1 at blkvsc0 bus 0 scbus1 target 0 lun 0 da1: Fixed Direct Access SPC-3 SCSI device da1: 300.000MB/s transfers da1: 20480MB (41943040 512 byte sectors: 255H 63S/T 2610C) pass3 at storvsc1 bus 0 scbus2 target 0 lun 1 pass3: < > Fixed Direct Access SCSI device pass3: 300.000MB/s transfers (probe0:storvsc1:0:0:2): Down reving Protocol Version from 4 to 0? da2 at storvsc1 bus 0 scbus2 target 0 lun 1 da2: < > Fixed Direct Access SCSI device da2: 300.000MB/s transfers da2: 0MB (0 512 byte sectors: 0H 0S/T 0C) da2: Delete methods: pass4 at storvsc1 bus 0 scbus2 target 1 lun 1 pass4: < > Fixed Direct Access SCSI device pass4: 300.000MB/s transfers (probe1:storvsc1:0:1:2): Down reving Protocol Version from 4 to 0? da3 at storvsc1 bus 0 scbus2 target 1 lun 1 da3: < > Fixed Direct Access SCSI device da3: 300.000MB/s transfers da3: 0MB (0 512 byte sectors: 0H 0S/T 0C) da3: Delete methods: (probe0:storvsc1:0:0:2): Down reving Protocol Version from 4 to 0? (probe1:storvsc1:0:1:2): Down reving Protocol Version from 4 to 0? pass5 at storvsc1 bus 0 scbus2 target 0 lun 2 pass5: < > Fixed Direct Access SCSI device pass5: 300.000MB/s transfers (probe0:storvsc1:0:0:3): Down reving Protocol Version from 4 to 0? da4 at storvsc1 bus 0 scbus2 target 0 lun 2 da4: < > Fixed Direct Access SCSI device da4: 300.000MB/s transfers da4: 0MB (0 512 byte sectors: 0H 0S/T 0C) da4: Delete methods: pass6 at storvsc1 bus 0 scbus2 target 1 lun 2 pass6: < > Fixed Direct Access SCSI device pass6: 300.000MB/s transfers (probe1:storvsc1:0:1:3): Down reving Protocol Version from 4 to 0? da5 at storvsc1 bus 0 scbus2 target 1 lun 2 da5: < > Fixed Direct Access SCSI device da5: 300.000MB/s transfers da5: 0MB (0 512 byte sectors: 0H 0S/T 0C) da5: Delete methods: (probe0:storvsc1:0:0:3): Down reving Protocol Version from 4 to 0? (probe1:storvsc1:0:1:3): Down reving Protocol Version from 4 to 0? pass7 at storvsc1 bus 0 scbus2 target 0 lun 3 pass7: < > Fixed Direct Access SCSI device pass7: 300.000MB/s transfers (probe0:storvsc1:0:0:4): Down reving Protocol Version from 4 to 0? da6 at storvsc1 bus 0 scbus2 target 0 lun 3 da6: < > Fixed Direct Access SCSI device da6: 300.000MB/s transfers da6: 0MB (0 512 byte sectors: 0H 0S/T 0C) da6: Delete methods: ... From owner-freebsd-scsi@freebsd.org Tue Nov 24 15:57:03 2015 Return-Path: Delivered-To: freebsd-scsi@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 77ACCA36888; Tue, 24 Nov 2015 15:57:03 +0000 (UTC) (envelope-from jonathon.reinhart@gmail.com) Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::230]) (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 3EEF31553; Tue, 24 Nov 2015 15:57:03 +0000 (UTC) (envelope-from jonathon.reinhart@gmail.com) Received: by ioir85 with SMTP id r85so24489490ioi.1; Tue, 24 Nov 2015 07:57:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=xei7LUa87zTMBwclifOkV6ud8NqI8amuNIBfwTw9MYE=; b=klXUUxlnxHxAID5qGQTkpzUmCG1kt+WKB4fbGdBfSYEuwMJemNEnT6hbUPuz2s+WIR zEYyrzHcb1ziCfKGPgqbEItyGowvebn8fTsV7Oqv/hscncpYj/vsVv+VcrS0kD3xO/0b ViA6uopTUejKkSkPa0CYiV9H7mTxS06HCKmuIYSFFjtlYq7vw2RtG8Hno3jl8Tq31ZQx z9BuMezCrzrj4DXf2z9TS+en7hH9GqkpOEAoxLlIqIl88AHypbd+N8GwOQYTGiBOh27H NRW8vWG+9qPVAkF1Aakx/8a1Tom9uNc8rg++GUiMEC0n4nHNpwN9yXR1spWO1W7C8uT3 6S6Q== X-Received: by 10.107.136.217 with SMTP id s86mr29697459ioi.142.1448380622662; Tue, 24 Nov 2015 07:57:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.36.10.67 with HTTP; Tue, 24 Nov 2015 07:56:33 -0800 (PST) In-Reply-To: References: <20151120.084410.74714437.sthaug@nethelp.no> <30640027-5C49-4AC0-9BAF-7E6208F7DD13@yahoo.com> From: Jonathon Reinhart Date: Tue, 24 Nov 2015 10:56:33 -0500 Message-ID: Subject: Re: ciss(4) HP Smart Array P840 To: Scott Long , sthaug@nethelp.no, Sean Bruno , freebsd-scsi@freebsd.org, freebsd-drivers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 15:57:03 -0000 After reviewing the differences between 9.3.1-STABLE and the latest FreeBSD, I've decided to try and merge the latest back into 9.3.1 so that I can use the current version of FreeNAS with my P840 controller. Please forgive my ignorance in the FreeBSD release / development process, as I'm not really sure how to figure out where FreeBSD releases are made relative to the source code. I'm looking on http://github.com/freebsd/freebsd, but there are no tags or releases. I realize this is probably because FreeBSD uses SVN, but the TrueOS on which FreeNAS is based uses Git. FreeNAS (http://github.com/freenas/freenas.git) branch 9.3.1-STABLE pulls in the FreeBSD source from TrueOS (http://github.com/trueos/trueos), at branch 9.3.1-STABLE. ------------------------------------------------------------------------------------------------------------------------------------------------------ Latest TrueOS change: $ git status On branch 9.3.1-STABLE $ git log -n2 sys/dev/ciss commit e2839cc1b8453737875676ba9e8d2f0b42aaa460 Author: sbruno Date: Mon Apr 21 16:55:02 2014 +0000 MFC r264127 Add PCI-IDs for TBD Gen9 RAID controller HBAs from HP to ciss(4) Submitted by: Benesh, Scott Sponsored by: Yahoo! Inc. commit 34cc27f945a62076a0d8826f61b1a0f90b20ae4f (d85167d0 on freebsd/freebsd) Author: sbruno Date: Tue Apr 15 17:52:22 2014 +0000 MFC r264354 but change the lock arg and implementation to fit the current state of CAM in stable/9 Fix insta-panic on assert of unlocked periph mtx in ciss(4) when logical volume state changes. I'm still setting the mergeinfo as done here as the intent of the MFC, if not the EXACT code is being implemented. Reviewed by: mav@ Sponsored by: Yahoo! Inc ------------------------------------------------------------------------------------------------------------------------------------------------------ These are the changes to freebsd/master that are *not* in TrueOS 9.3.1-STABLE $ git log --oneline d85167d~1..HEAD sys/dev/ciss 590adc1 r249170 was just plain wrong. The effect of the change is to always delete a logic volume on status change which is NOT what we want here. bc3e70b Remove redundant mtx_lock/unlock in ciss_name_device. This is a guaranteed insta-panic on device add/remove. This is only called from the notify thread which already holds the lock while calling this function. 346273b Remove MAXBSIZE use from drivers where it has nothing to do. c8a5ac8 Remove compat shims for FreeBSD versions older than 6 (really early 5). The only diffs in the disassembly were different line numbers passed to lock functions. dd63bf9 Prevent overflow issues in timeout processing fcae8e0 Add detection for ciss(4) controllers that are set to non-raid JBOD mode. If a controller is set to JBOD, it has no RAID functions turned on. af69ed3 Check return of cam_periph_find() before using it in a printf. d85167d Fix insta-panic on assert of unlocked periph mtx in ciss(4) when logical volume state changes ------------------------------------------------------------------------------------------------------------------------------------------------------ fcae8e0 Appears to be the winner here, adding JBOD / HBA mode support. I've done my best to apply those patches to TrueOS 9.3.1-STABLE, and I'm building it now. After those commits, the only difference between FreeBSD "master" and my branch is: diff -u freebsd/sys/dev/ciss/ciss.c trueos/sys/dev/ciss/ciss.c --- freebsd/sys/dev/ciss/ciss.c 2015-11-23 17:53:43.119544620 -0500 +++ trueos/sys/dev/ciss/ciss.c 2015-11-24 10:51:50.609160463 -0500 @@ -4388,17 +4388,11 @@ DB_COMMAND(ciss_prt, db_ciss_prt) { struct ciss_softc *sc; - devclass_t dc; - int maxciss, i; - dc = devclass_find("ciss"); - if ( dc == NULL ) { - printf("%s: can't find devclass!\n", __func__); - return; - } - maxciss = devclass_get_maxunit(dc); - for (i = 0; i < maxciss; i++) { - sc = devclass_get_softc(dc, i); + sc = devclass_get_softc(devclass_find("ciss"), 0); + if (sc == NULL) { + printf("no ciss controllers\n"); + } else { ciss_print_adapter(sc); } If anyone, namely Sean, be willing to take a look at my diff, I would greatly appreciate it: https://github.com/trueos/trueos/compare/9.3.1-STABLE...JonathonReinhart:update-ciss-to-latest You'll see there is one commit that I made, and that is the one I'm unsure of. Thank you for your time, Jonathon Reinhart From owner-freebsd-scsi@freebsd.org Wed Nov 25 02:27:05 2015 Return-Path: Delivered-To: freebsd-scsi@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 DB060A37F1F; Wed, 25 Nov 2015 02:27:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5EF01097; Wed, 25 Nov 2015 02:27:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id C7840B95B; Tue, 24 Nov 2015 21:27:04 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Cc: Adrian Chadd , "Pokala, Ravi" , "freebsd-geom@freebsd.org" , "ken@freebsd.org" , "scottl@freebsd.org" , "freebsd-scsi@freebsd.org" , "imp@freebsd.org" Subject: Re: Low-level trace-buffers in CAM Date: Tue, 24 Nov 2015 18:07:39 -0800 Message-ID: <1676097.ULW1yzL7e7@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 24 Nov 2015 21:27:04 -0500 (EST) X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 02:27:06 -0000 On Monday, October 26, 2015 09:52:25 PM Adrian Chadd wrote: > Hi, > > ok. So this is where I create work for people. :-) > > Something I've been tossing up for quite some time is a generic > version of this that exposes a ring-buffer of entries back to > userland. For things like this, things like ALQ/KTR, etc, it's all > just a producer-consumer ring based thing. You don't even care about > multiple readers; that's a userland thing. > > So, I'm a big fan of this. I did this for the ath driver to debug > descriptors and register accesses and it was a big help. I'd really > like to see a more generic way we can expose this data in an efficient > manner! I actually think bpf might not be a bad interface (as I suggested at the vendor summit), though I think we need a way to enumerate BPF taps that aren't network interfaces (if we fix this then we can remove the fake USB ifnets and make glebius@ happy as well). Then you can look at these things in wireshark (which would be a bit bizarre perhaps) -- John Baldwin From owner-freebsd-scsi@freebsd.org Wed Nov 25 23:34:39 2015 Return-Path: Delivered-To: freebsd-scsi@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 C12CEA36CCE; Wed, 25 Nov 2015 23:34:39 +0000 (UTC) (envelope-from rpokala@panasas.com) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0068.outbound.protection.outlook.com [157.56.110.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 925EE1CCD; Wed, 25 Nov 2015 23:34:37 +0000 (UTC) (envelope-from rpokala@panasas.com) Received: from CY1PR08MB1803.namprd08.prod.outlook.com (10.162.218.25) by CY1PR08MB1804.namprd08.prod.outlook.com (10.162.218.26) with Microsoft SMTP Server (TLS) id 15.1.331.20; Wed, 25 Nov 2015 23:18:38 +0000 Received: from CY1PR08MB1803.namprd08.prod.outlook.com ([10.162.218.25]) by CY1PR08MB1803.namprd08.prod.outlook.com ([10.162.218.25]) with mapi id 15.01.0331.019; Wed, 25 Nov 2015 23:18:38 +0000 From: "Pokala, Ravi" To: John Baldwin , "freebsd-hackers@freebsd.org" CC: Adrian Chadd , "freebsd-geom@freebsd.org" , "ken@freebsd.org" , "scottl@freebsd.org" , "freebsd-scsi@freebsd.org" , "imp@freebsd.org" Subject: Re: Low-level trace-buffers in CAM Thread-Topic: Low-level trace-buffers in CAM Thread-Index: AQHREF5W2DCPOIdjUUGMRg6fRJs3w55+pEiAgC2HGoCAANz+gA== Date: Wed, 25 Nov 2015 23:18:37 +0000 Message-ID: <4C8D47C3-CA6C-46DA-A318-98E114B2A506@panasas.com> References: <1676097.ULW1yzL7e7@ralph.baldwin.cx> In-Reply-To: <1676097.ULW1yzL7e7@ralph.baldwin.cx> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/0.0.0.151105 authentication-results: spf=none (sender IP is ) smtp.mailfrom=rpokala@panasas.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [64.80.217.3] x-microsoft-exchange-diagnostics: 1; CY1PR08MB1804; 5:A6yut9WBvVBgzrYFWRoHofcgqoUxDxfdMadisZQZr3vzOu+W1GR1UhaRS33nIlb5x7tQY4Am+bLflgVwDu4/psUmbIdjTySBOEeFlKEuvXKr2sVeqBSTdWzkdh70NN92aJUQBharyFp+T18phFKUQA==; 24:hNLANSEq4hNx2m7zYkOmQKhUo84RqYRcbq2c7RP6zOE/mvk9iH7DGMfBehjFmPwxW7TQnc3Cou4NMQHa9FGXG/BmT2ibVcOWgcONXselamw= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR08MB1804; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(239227872634102); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(10201501046)(3002001); SRVR:CY1PR08MB1804; BCL:0; PCL:0; RULEID:; SRVR:CY1PR08MB1804; x-forefront-prvs: 0771670921 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(377424004)(377454003)(199003)(13464003)(189002)(24454002)(10400500002)(2900100001)(106116001)(99286002)(4001150100001)(66066001)(36756003)(102836003)(106356001)(5008740100001)(101416001)(1220700001)(5001770100001)(81156007)(4001350100001)(77096005)(83506001)(5004730100002)(76176999)(92566002)(97736004)(105586002)(11100500001)(2501003)(33656002)(3846002)(86362001)(586003)(40100003)(19580405001)(5001960100002)(82746002)(54356999)(50986999)(19580395003)(87936001)(122556002)(189998001)(2950100001)(6116002)(83716003)(5002640100001)(1096002)(104396002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR08MB1804; H:CY1PR08MB1803.namprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: panasas.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <0CAB380AABB07C4BB4B80B072D1649AD@namprd08.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: panasas.com X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Nov 2015 23:18:37.8766 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: acf01c9d-c699-42af-bdbb-44bf582e60b0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR08MB1804 X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 23:34:39 -0000 LS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCg0KDQpGcm9tOiBKb2huIEJhbGR3aW4gPGpoYkBm cmVlYnNkLm9yZz4NCkRhdGU6IDIwMTUtMTEtMjQsIFR1ZXNkYXkgYXQgMTg6MDcNClRvOiAiZnJl ZWJzZC1oYWNrZXJzQGZyZWVic2Qub3JnIiA8ZnJlZWJzZC1oYWNrZXJzQGZyZWVic2Qub3JnPg0K Q2M6IEFkcmlhbiBDaGFkZCA8YWRyaW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si@freebsd.org Thu Nov 26 00:21:07 2015 Return-Path: Delivered-To: freebsd-scsi@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 E565CA37640; Thu, 26 Nov 2015 00:21:07 +0000 (UTC) (envelope-from stas@freebsd.org) Received: from mx0.deglitch.com (cl-414.sto-01.se.sixxs.net [IPv6:2001:16d8:ff00:19d::2]) by mx1.freebsd.org (Postfix) with ESMTP id 945201C63; Thu, 26 Nov 2015 00:21:07 +0000 (UTC) (envelope-from stas@freebsd.org) Received: from [172.27.138.58] (unknown [199.201.64.131]) by mx0.deglitch.com (Postfix) with ESMTPSA id 8F8898FC2D; Wed, 25 Nov 2015 16:20:54 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Subject: Re: Low-level trace-buffers in CAM From: Stanislav Sedov In-Reply-To: <1676097.ULW1yzL7e7@ralph.baldwin.cx> Date: Wed, 25 Nov 2015 16:20:50 -0800 Cc: freebsd-hackers@freebsd.org, Adrian Chadd , "freebsd-geom@freebsd.org" , "ken@freebsd.org" , "Pokala, Ravi" , "scottl@freebsd.org" , "freebsd-scsi@freebsd.org" , "imp@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <1676097.ULW1yzL7e7@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.3096.5) X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 00:21:08 -0000 > On Nov 24, 2015, at 6:07 PM, John Baldwin wrote: >=20 > I actually think bpf might not be a bad interface (as I suggested at > the vendor summit), though I think we need a way to enumerate BPF taps > that aren't network interfaces (if we fix this then we can remove the > fake USB ifnets and make glebius@ happy as well). Then you can look > at these things in wireshark (which would be a bit bizarre perhaps) This is an interesting idea! Wireshark access does not sound too = bizzare actually -- wireshark supports FC protocol parsing as well as generic = SCSI dissecting. This is immensely useful when debugging FC communication problems, and I can imaging it would be helpful in other situations as = well. On the other hand, if we are talking about generic ring buffer logger with userland access -- isn't DTrace essentialy that? DTrace provides a very efficient data collection framework with the filtering = capabilities not unlike BPF. We can already access most of the information the new = proposed framework hopes to provide without any kernel code modifications = (including raw CDBs), and by adding the missing static DTrace probes we can provide an easy access to the same data both BPF and an ad-hoc framework would = while also giving a flexibility of accessing auxiliary data without code = modifications. This will allow for a pure-userland pcap generation as well (or any kind = of custom reporting). Something to think about as well. -- Stanislav Sedov ST4096-RIPE From owner-freebsd-scsi@freebsd.org Thu Nov 26 03:28:16 2015 Return-Path: Delivered-To: freebsd-scsi@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 7EDB2A37519; Thu, 26 Nov 2015 03:28:16 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 539AE1498; Thu, 26 Nov 2015 03:28:15 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-251-140.lns20.per4.internode.on.net [121.45.251.140]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id tAQ3RxZL074102 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 25 Nov 2015 19:28:02 -0800 (PST) (envelope-from julian@freebsd.org) Subject: Re: Low-level trace-buffers in CAM To: John Baldwin , freebsd-hackers@freebsd.org References: <1676097.ULW1yzL7e7@ralph.baldwin.cx> Cc: Adrian Chadd , "freebsd-geom@freebsd.org" , "ken@freebsd.org" , "Pokala, Ravi" , "scottl@freebsd.org" , "freebsd-scsi@freebsd.org" , "imp@freebsd.org" From: Julian Elischer Message-ID: <56567C39.6050002@freebsd.org> Date: Thu, 26 Nov 2015 11:27:53 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1676097.ULW1yzL7e7@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 03:28:16 -0000 On 25/11/2015 10:07 AM, John Baldwin wrote: > On Monday, October 26, 2015 09:52:25 PM Adrian Chadd wrote: >> Hi, >> >> ok. So this is where I create work for people. :-) >> >> Something I've been tossing up for quite some time is a generic >> version of this that exposes a ring-buffer of entries back to >> userland. For things like this, things like ALQ/KTR, etc, it's all >> just a producer-consumer ring based thing. You don't even care about >> multiple readers; that's a userland thing. >> >> So, I'm a big fan of this. I did this for the ath driver to debug >> descriptors and register accesses and it was a big help. I'd really >> like to see a more generic way we can expose this data in an efficient >> manner! > I actually think bpf might not be a bad interface (as I suggested at > the vendor summit), though I think we need a way to enumerate BPF taps > that aren't network interfaces (if we fix this then we can remove the > fake USB ifnets and make glebius@ happy as well). Then you can look > at these things in wireshark (which would be a bit bizarre perhaps) I disagree. the advent of iSCSI makes this a natural thing. I would be very surprised if there were not already patches for wireshark to interpret scsi command blocks. I agree with you on this, it is a very logical way to do it. We may need to define a new form of interface for it but it makes perfect sense.