From owner-freebsd-scsi@FreeBSD.ORG Mon Mar 1 01:23:47 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 B4D1A1065670 for ; Mon, 1 Mar 2010 01:23:47 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-iw0-f191.google.com (mail-iw0-f191.google.com [209.85.223.191]) by mx1.freebsd.org (Postfix) with ESMTP id 7E6E88FC15 for ; Mon, 1 Mar 2010 01:23:47 +0000 (UTC) Received: by iwn29 with SMTP id 29so1255073iwn.27 for ; Sun, 28 Feb 2010 17:23:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=v4sWtQYL4o3z2szPTrJvjGslFwwzLHarlgRZEy2YpwM=; b=bZqqiDaWnASR5bFXsAQ1OULAld8iEl8GWErew9M/uNJNbj7ONo6xrcTmnKbSTVDM8x OlwYhdWQe6J5jJUjxrIsgBkSU0DBOPYDsHvvr4gdRSPJ67iowX15crIvpzJF79InBtqC 51wTibCLfDfte1nZ5bOLxKR8WJt3asXhVWso0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; b=sHr7AKb9ICQ2D2xUttQ8M3gU882H+DcVoj/AmSHiwCaNbighSI66saEfhOhqxJpFHu R2z5jRST4SOI6GEaJEbQ+tp/yBd66xYPcwXIY/A4u8MacZ5tc4NW9hHngh8n4eFVWKEU /R8r2KzcfeTLR69e88BMoemnMQ63hYV9pfZx0= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.231.146.66 with SMTP id g2mr209904ibv.60.1267404903123; Sun, 28 Feb 2010 16:55:03 -0800 (PST) Date: Mon, 1 Mar 2010 01:55:03 +0100 X-Google-Sender-Auth: d548a7ee3e84614c Message-ID: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> From: Attilio Rao To: freebsd-scsi@freebsd.org Content-Type: text/plain; charset=UTF-8 Cc: "Justin T. Gibbs" Subject: How is supposed to be protected the units list? 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: Mon, 01 Mar 2010 01:23:47 -0000 Hello, I have a question that I've been unable to reply reading the code. Someone could point me to documentation explaining how the unit tailq (within a struct periph_driver) is supposed to be locked? I'm not sure how it is assured consistency of accesses to the list and more important how is ensured that the periphs composing it doesn't go away as I don't see any reference bump for objects inserted there. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-scsi@FreeBSD.ORG Mon Mar 1 09:31:21 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 CB5D4106564A for ; Mon, 1 Mar 2010 09:31:21 +0000 (UTC) (envelope-from omerfsen@gmail.com) Received: from mail-fx0-f223.google.com (mail-fx0-f223.google.com [209.85.220.223]) by mx1.freebsd.org (Postfix) with ESMTP id 54D478FC15 for ; Mon, 1 Mar 2010 09:31:21 +0000 (UTC) Received: by fxm23 with SMTP id 23so449714fxm.3 for ; Mon, 01 Mar 2010 01:31:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=/7/N650OR54oq/99DOLvz5Znd8MAMqYDWQbsGaWHWZo=; b=a2nSVzgMARjA4pZEbjZdV6yjvwK02hI53q1MBUS2C8P/C0MEmvuchHyJRNrsdsjaoI 9jSUX8fq8t2xHRE6JU5baguUnuhTki+iCgyyMB8VPnZCQcTls6e3dX9CdmKo6lakj7Na Nq97Rv4v194Bhhhmc2urCGcNtkZa4Q6E88a7w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=QLk4/mbGJPMf1XpgVurK1qs9QcF7UR1p2KOaR9EAznsD/O9vghvAmXIiPp5Qw1IK2V qLGlGRvvpYAnJ8PS/xzG/zF+i3r1LP3magp/vT/E3FT3PmulcFTDtVVeMuqdtOsLZWx1 miobs1PikeFkSSwwwlkMSXMA8QXZWMtX37PBs= MIME-Version: 1.0 Received: by 10.239.190.138 with SMTP id x10mr367623hbh.134.1267434152551; Mon, 01 Mar 2010 01:02:32 -0800 (PST) Date: Mon, 1 Mar 2010 11:02:32 +0200 Message-ID: <75a268721003010102n4e1cc375qdbd8f3b2acb96c40@mail.gmail.com> From: Omer Faruk Sen To: FreeBSD , freebsd-scsi@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: IBM DS4800 Storage 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: Mon, 01 Mar 2010 09:31:21 -0000 Hi , Is there anyone here that have used SAN against IBM DS4800 (Fiber). I can see disk but i can't fdisk it. # camcontrol devlist -v scbus0 on isp0 bus 0: < > at scbus0 target -1 lun -1 () scbus1 on isp1 bus 0: at scbus1 target 0 lun 6 (pass0,da0) < > at scbus1 target -1 lun -1 () scbus-1 on xpt0 bus 0: < > at scbus-1 target -1 lun -1 (xpt0) fdisk /dev/da0 fdisk: could not detect sector size and dmesg output when system boots: registered firmware set registered firmware set registered firmware set registered firmware set registered firmware set registered firmware set registered firmware set registered firmware set registered firmware set registered firmware set registered firmware set isp0: port 0x6000-0x60ff mem 0xc7efc000-0xc7efffff irq 17 at device 0.0 on pci36 isp0: [ITHREAD] isp0: Board Type 2422, Chip Revision 0x3, loaded F/W Revision 4.0.20 isp1: port 0x7000-0x70ff mem 0xc5ffc000-0xc5ffffff irq 18 at device 0.0 on pci7 isp1: [ITHREAD] isp1: Board Type 2422, Chip Revision 0x3, loaded F/W Revision 4.0.20 vgapci0: port 0x4000-0x40ff mem 0xd0000000-0xd7ffffff,0xdfff0000-0xdfffffff irq 22 at device 6.0 on pci1 isp1: 0.0.2 FCP RESPONSE: 0x2 isp1: 0.0.2 FCP RESPONSE: 0x2 isp1: 0.0.2 FCP RESPONSE: 0x2 isp1: 0.0.2 FCP RESPONSE: 0x2 isp1: 0.0.2 FCP RESPONSE: 0x2 isp1: 0.0.2 FCP RESPONSE: 0x2 isp1: 0.0.2 FCP RESPONSE: 0x2 isp1: 0.0.2 FCP RESPONSE: 0x2 isp1: 0.0.2 FCP RESPONSE: 0x2 isp1: 0.0.2 FCP RESPONSE: 0x2 isp1: 0.0.2 FCP RESPONSE: 0x2 and afterwards: (da0:isp1:0:0:6): Vendor Specific ASC (da0:isp1:0:0:6): Unretryable error (da0:isp1:0:0:6): READ(10). CDB: 28 0 0 0 0 10 0 0 1 0 (da0:isp1:0:0:6): CAM Status: SCSI Status Error (da0:isp1:0:0:6): SCSI Status: Check Condition (da0:isp1:0:0:6): ILLEGAL REQUEST asc:94,1 (da0:isp1:0:0:6): Vendor Specific ASC (da0:isp1:0:0:6): Unretryable error (da0:isp1:0:0:6): READ(10). CDB: 28 0 0 0 0 80 0 0 1 0 (da0:isp1:0:0:6): CAM Status: SCSI Status Error (da0:isp1:0:0:6): SCSI Status: Check Condition (da0:isp1:0:0:6): ILLEGAL REQUEST asc:94,1 (da0:isp1:0:0:6): Vendor Specific ASC (da0:isp1:0:0:6): Unretryable error (da0:isp1:0:0:6): READ(10). CDB: 28 0 0 0 0 0 0 0 1 0 (da0:isp1:0:0:6): CAM Status: SCSI Status Error (da0:isp1:0:0:6): SCSI Status: Check Condition (da0:isp1:0:0:6): ILLEGAL REQUEST asc:94,1 (da0:isp1:0:0:6): Vendor Specific ASC (da0:isp1:0:0:6): Unretryable error isp1: 0.0.6 FCP RESPONSE: 0x2 (da0:isp1:0:0:6): Synchronize cache failed, status == 0x59, scsi status == 0x0 (da0:isp1:0:0:6): READ(10). CDB: 28 0 0 0 0 0 0 0 1 0 (da0:isp1:0:0:6): CAM Status: SCSI Status Error (da0:isp1:0:0:6): SCSI Status: Check Condition (da0:isp1:0:0:6): ILLEGAL REQUEST asc:94,1 (da0:isp1:0:0:6): Vendor Specific ASC (da0:isp1:0:0:6): Unretryable error isp1: 0.0.6 FCP RESPONSE: 0x2 (da0:isp1:0:0:6): Synchronize cache failed, status == 0x59, scsi status == 0x0 (da0:isp1:0:0:6): READ(10). CDB: 28 0 0 0 0 0 0 0 1 0 (da0:isp1:0:0:6): CAM Status: SCSI Status Error (da0:isp1:0:0:6): SCSI Status: Check Condition (da0:isp1:0:0:6): ILLEGAL REQUEST asc:94,1 (da0:isp1:0:0:6): Vendor Specific ASC (da0:isp1:0:0:6): Unretryable error isp1: 0.0.6 FCP RESPONSE: 0x2 (da0:isp1:0:0:6): Synchronize cache failed, status == 0x59, scsi status == 0x0 (da0:isp1:0:0:6): READ(10). CDB: 28 0 0 0 0 0 0 0 1 0 (da0:isp1:0:0:6): CAM Status: SCSI Status Error (da0:isp1:0:0:6): SCSI Status: Check Condition (da0:isp1:0:0:6): ILLEGAL REQUEST asc:94,1 (da0:isp1:0:0:6): Vendor Specific ASC (da0:isp1:0:0:6): Unretryable error isp1: 0.0.6 FCP RESPONSE: 0x2 (da0:isp1:0:0:6): Synchronize cache failed, status == 0x59, scsi status == 0x0 (da0:isp1:0:0:6): READ(10). CDB: 28 0 0 0 0 0 0 0 1 0 (da0:isp1:0:0:6): CAM Status: SCSI Status Error (da0:isp1:0:0:6): SCSI Status: Check Condition (da0:isp1:0:0:6): ILLEGAL REQUEST asc:94,1 (da0:isp1:0:0:6): Vendor Specific ASC (da0:isp1:0:0:6): Unretryable error isp1: 0.0.6 FCP RESPONSE: 0x2 (da0:isp1:0:0:6): Synchronize cache failed, status == 0x59, scsi status == 0x0 (da0:isp1:0:0:6): READ(10). CDB: 28 0 0 0 0 0 0 0 1 0 (da0:isp1:0:0:6): CAM Status: SCSI Status Error (da0:isp1:0:0:6): SCSI Status: Check Condition (da0:isp1:0:0:6): ILLEGAL REQUEST asc:94,1 (da0:isp1:0:0:6): Vendor Specific ASC (da0:isp1:0:0:6): Unretryable error isp1: 0.0.6 FCP RESPONSE: 0x2 (da0:isp1:0:0:6): Synchronize cache failed, status == 0x59, scsi status == 0x0 (da0:isp1:0:0:6): READ(10). CDB: 28 0 0 0 0 0 0 0 1 0 (da0:isp1:0:0:6): CAM Status: SCSI Status Error (da0:isp1:0:0:6): SCSI Status: Check Condition (da0:isp1:0:0:6): ILLEGAL REQUEST asc:94,1 (da0:isp1:0:0:6): Vendor Specific ASC (da0:isp1:0:0:6): Unretryable error isp1: 0.0.6 FCP RESPONSE: 0x2 (da0:isp1:0:0:6): Synchronize cache failed, status == 0x59, scsi status == 0x0 (da0:isp1:0:0:6): READ(10). CDB: 28 0 0 0 0 0 0 0 1 0 (da0:isp1:0:0:6): CAM Status: SCSI Status Error (da0:isp1:0:0:6): SCSI Status: Check Condition (da0:isp1:0:0:6): ILLEGAL REQUEST asc:94,1 (da0:isp1:0:0:6): Vendor Specific ASC (da0:isp1:0:0:6): Unretryable error isp1: 0.0.6 FCP RESPONSE: 0x2 (da0:isp1:0:0:6): Synchronize cache failed, status == 0x59, scsi status == 0x0 I have used FreeBSD 7.1 and FreeBSD 7.2 but both seems to fail. On Storage side I have used Linux and Solaris with/without MPXIO as file system (there is no FreeBSD ) From owner-freebsd-scsi@FreeBSD.ORG Mon Mar 1 11:07:09 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 27F951065689 for ; Mon, 1 Mar 2010 11:07:09 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 15A4C8FC25 for ; Mon, 1 Mar 2010 11:07:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o21B78Fg017914 for ; Mon, 1 Mar 2010 11:07:08 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o21B78o9017912 for freebsd-scsi@FreeBSD.org; Mon, 1 Mar 2010 11:07:08 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 1 Mar 2010 11:07:08 GMT Message-Id: <201003011107.o21B78o9017912@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-scsi@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-scsi@FreeBSD.org 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: Mon, 01 Mar 2010 11:07:09 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/144301 scsi [ciss] [hang] HP proliant server locks when using ciss o kern/142351 scsi [mpt] LSILogic driver performance problems o kern/141934 scsi [cam] [patch] add support for SEAGATE DAT Scopion 130 o kern/140091 scsi [da] [patch] allow for da(4) large block transfer than o kern/134488 scsi [mpt] MPT SCSI driver probes max. 8 LUNs per device o kern/132250 scsi [ciss] ciss driver does not support more then 15 drive o kern/132206 scsi [mpt] system panics on boot when mirroring and 2nd dri p kern/130735 scsi [cam] [patch] pass M_NOWAIT to the malloc() call insid o kern/130621 scsi [mpt] tranfer rate is inscrutable slow when use lsi213 o kern/129602 scsi [ahd] ahd(4) gets confused and wedges SCSI bus o kern/128452 scsi [sa] [panic] Accessing SCSI tape drive randomly crashe o kern/128245 scsi [scsi] "inquiry data fails comparison at DV1 step" [re o kern/127927 scsi [isp] isp(4) target driver crashes kernel when set up o kern/124667 scsi [amd] [panic] FreeBSD-7 kernel page faults at amd-scsi o kern/123674 scsi [ahc] ahc driver dumping f kern/123666 scsi [aac] attach fails with Adaptec SAS RAID 3805 controll o sparc/121676 scsi [iscsi] iscontrol do not connect iscsi-target on sparc o kern/120487 scsi [sg] scsi_sg incompatible with scanners o kern/120247 scsi [mpt] FreeBSD 6.3 and LSI Logic 1030 = only 3.300MB/s o kern/119668 scsi [cam] [patch] certain errors are too verbose comparing o kern/114597 scsi [sym] System hangs at SCSI bus reset with dual HBAs o kern/110847 scsi [ahd] Tyan U320 onboard problem with more than 3 disks o kern/99954 scsi [ahc] reading from DVD failes on 6.x [regression] o kern/94838 scsi Kernel panic while mounting SD card with lock switch o o kern/92798 scsi [ahc] SCSI problem with timeouts o kern/90282 scsi [sym] SCSI bus resets cause loss of ch device o kern/76178 scsi [ahd] Problem with ahd and large SCSI Raid system o kern/74627 scsi [ahc] [hang] Adaptec 2940U2W Can't boot 5.3 s kern/61165 scsi [panic] kernel page fault after calling cam_send_ccb o kern/60641 scsi [sym] Sporadic SCSI bus resets with 53C810 under load o kern/60598 scsi wire down of scsi devices conflicts with config s kern/57398 scsi [mly] Current fails to install on mly(4) based RAID di o kern/52638 scsi [panic] SCSI U320 on SMP server won't run faster than o kern/44587 scsi dev/dpt/dpt.h is missing defines required for DPT_HAND o kern/40895 scsi wierd kernel / device driver bug o kern/39388 scsi ncr/sym drivers fail with 53c810 and more than 256MB m o kern/35234 scsi World access to /dev/pass? (for scanner) requires acce 37 problems total. From owner-freebsd-scsi@FreeBSD.ORG Mon Mar 1 15:07:24 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 E599C106566B for ; Mon, 1 Mar 2010 15:07:24 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id AC5098FC12 for ; Mon, 1 Mar 2010 15:07:24 +0000 (UTC) Received: from [192.168.0.101] (m206-63.dsl.tsoft.com [198.144.206.63]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o21F7OgN030690 for ; Mon, 1 Mar 2010 07:07:24 -0800 (PST) (envelope-from mj@feral.com) Message-ID: <4B8BD82E.6040705@feral.com> Date: Mon, 01 Mar 2010 07:07:26 -0800 From: Matthew Jacob User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100216 Thunderbird/3.0.2 MIME-Version: 1.0 To: freebsd-scsi@freebsd.org References: <75a268721003010102n4e1cc375qdbd8f3b2acb96c40@mail.gmail.com> In-Reply-To: <75a268721003010102n4e1cc375qdbd8f3b2acb96c40@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.67.166.1]); Mon, 01 Mar 2010 07:07:24 -0800 (PST) Subject: Re: IBM DS4800 Storage 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: Mon, 01 Mar 2010 15:07:25 -0000 On 3/1/2010 1:02 AM, Omer Faruk Sen wrote: > Hi , > > > It looks like it is not configured correctly and exporting luns that are usable to you. From owner-freebsd-scsi@FreeBSD.ORG Mon Mar 1 15:55:26 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 5BF57106566B for ; Mon, 1 Mar 2010 15:55:26 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email1.allantgroup.com (email1.emsphone.com [199.67.51.115]) by mx1.freebsd.org (Postfix) with ESMTP id 229AF8FC17 for ; Mon, 1 Mar 2010 15:55:26 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email1.allantgroup.com (8.14.0/8.14.0) with ESMTP id o21Fe6FA089874 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 1 Mar 2010 09:40:07 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.4/8.14.3) with ESMTP id o21Fe64Q018002 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 1 Mar 2010 09:40:06 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.4/8.14.3/Submit) id o21Fe53g017999; Mon, 1 Mar 2010 09:40:05 -0600 (CST) (envelope-from dan) Date: Mon, 1 Mar 2010 09:40:05 -0600 From: Dan Nelson To: Omer Faruk Sen Message-ID: <20100301154004.GU70798@dan.emsphone.com> References: <75a268721003010102n4e1cc375qdbd8f3b2acb96c40@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <75a268721003010102n4e1cc375qdbd8f3b2acb96c40@mail.gmail.com> X-OS: FreeBSD 7.2-STABLE User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: clamav-milter 0.95.3 at email1.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (email1.allantgroup.com [199.67.51.78]); Mon, 01 Mar 2010 09:40:07 -0600 (CST) X-Scanned-By: MIMEDefang 2.45 Cc: freebsd-scsi@freebsd.org, FreeBSD Subject: Re: IBM DS4800 Storage 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: Mon, 01 Mar 2010 15:55:26 -0000 In the last episode (Mar 01), Omer Faruk Sen said: > Is there anyone here that have used SAN against IBM DS4800 (Fiber). I > can see disk but i can't fdisk it. > > fdisk /dev/da0 > fdisk: could not detect sector size > > and dmesg output when system boots: > > registered firmware set > registered firmware set > registered firmware set > registered firmware set > registered firmware set > registered firmware set > registered firmware set > registered firmware set > registered firmware set > registered firmware set > registered firmware set > isp0: port 0x6000-0x60ff mem 0xc7efc000-0xc7efffff irq 17 at device 0.0 on pci36 > isp0: [ITHREAD] > isp0: Board Type 2422, Chip Revision 0x3, loaded F/W Revision 4.0.20 > isp1: port 0x7000-0x70ff mem 0xc5ffc000-0xc5ffffff irq 18 at device 0.0 on pci7 > isp1: [ITHREAD] > isp1: Board Type 2422, Chip Revision 0x3, loaded F/W Revision 4.0.20 > vgapci0: port 0x4000-0x40ff mem 0xd0000000-0xd7ffffff,0xdfff0000-0xdfffffff irq 22 at device 6.0 on pci1 > isp1: 0.0.2 FCP RESPONSE: 0x2 > isp1: 0.0.2 FCP RESPONSE: 0x2 > > and afterwards: > > (da0:isp1:0:0:6): Vendor Specific ASC > (da0:isp1:0:0:6): Unretryable error > (da0:isp1:0:0:6): READ(10). CDB: 28 0 0 0 0 10 0 0 1 0 > (da0:isp1:0:0:6): CAM Status: SCSI Status Error > (da0:isp1:0:0:6): SCSI Status: Check Condition > (da0:isp1:0:0:6): ILLEGAL REQUEST asc:94,1 > (da0:isp1:0:0:6): Vendor Specific ASC > (da0:isp1:0:0:6): Unretryable error According to the "DS4000 Problem Determination Guide" at ftp://ftp.software.ibm.com/systems/support/system_x_pdf/gc27207600.pdf#page=104 , ASC/ASCQ 94/01 corresponds to "Invalid Request Due to Current Logical Unit Ownership". Maybe the DS4800 thinks that the lun has been assigned to a different host, and that's why it won't let the FreeBSD machine access it. Other web searches indicate that this may be an attempt to access the passive path of multipathed device on an active/passive RAID array. If that's the case, FreeBSD should have found another disk (da1 possibly?) that you should be able to use. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-scsi@FreeBSD.ORG Mon Mar 1 17:47:38 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 90A911065697; Mon, 1 Mar 2010 17:47:38 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id 358288FDF0; Mon, 1 Mar 2010 17:47:04 +0000 (UTC) Received: from [192.168.221.2] (remotevpn [192.168.221.2]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o21Hl38s031708 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 1 Mar 2010 09:47:04 -0800 (PST) (envelope-from mj@feral.com) Message-ID: <4B8BFD97.1040609@feral.com> Date: Mon, 01 Mar 2010 09:47:03 -0800 From: Matthew Jacob Organization: Feral Software User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc11 Thunderbird/3.0.1 MIME-Version: 1.0 To: Panagiotis Christias References: <20100210001536.GA71093@noc.ntua.gr> <20100221053723.GA85983@noc.ntua.gr> <4B80E52B.4080400@feral.com> <4B85AA46.2000804@noc.ntua.gr> In-Reply-To: <4B85AA46.2000804@noc.ntua.gr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.168.221.1]); Mon, 01 Mar 2010 09:47:04 -0800 (PST) Cc: freebsd-scsi@freebsd.org, Kenneth Merry Subject: Re: MFC latest isp(4) driver into 7.3? X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mjacob@freebsd.org List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 17:47:41 -0000 RELENG_7, RELENG_8 and HEAD all contain the same isp bits. From owner-freebsd-scsi@FreeBSD.ORG Mon Mar 1 19:37:07 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 13E8B106566B; Mon, 1 Mar 2010 19:37:07 +0000 (UTC) (envelope-from p.christias@noc.ntua.gr) Received: from diomedes.noc.ntua.gr (diomedes.noc.ntua.gr [IPv6:2001:648:2000:de::220]) by mx1.freebsd.org (Postfix) with ESMTP id 7F3F88FC12; Mon, 1 Mar 2010 19:37:06 +0000 (UTC) Received: from ajax.noc.ntua.gr (ajax6.noc.ntua.gr [IPv6:2001:648:2000:dc::1]) by diomedes.noc.ntua.gr (8.14.3/8.14.3) with ESMTP id o21Jb3Uf012042 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 1 Mar 2010 21:37:04 +0200 (EET) (envelope-from p.christias@noc.ntua.gr) Received: from [147.102.224.68] (ovpn-68.noc.ntua.gr [147.102.224.68]) (authenticated bits=0) by ajax.noc.ntua.gr (8.14.3/8.14.3) with ESMTP id o21Jb0N6090803 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 1 Mar 2010 21:37:00 +0200 (EET) (envelope-from p.christias@noc.ntua.gr) Message-ID: <4B8C1759.3050801@noc.ntua.gr> Date: Mon, 01 Mar 2010 21:36:57 +0200 From: Panagiotis Christias User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: mjacob@freebsd.org References: <20100210001536.GA71093@noc.ntua.gr> <20100221053723.GA85983@noc.ntua.gr> <4B80E52B.4080400@feral.com> <4B85AA46.2000804@noc.ntua.gr> <4B8BFD97.1040609@feral.com> In-Reply-To: <4B8BFD97.1040609@feral.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.95.3 at diomedes.noc.ntua.gr X-Virus-Status: Clean X-Spam-Status: No, score=-19.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, USER_IN_DEF_WHITELIST autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on ajax.noc.ntua.gr X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (diomedes.noc.ntua.gr [IPv6:2001:648:2000:de::220]); Mon, 01 Mar 2010 21:37:04 +0200 (EET) Cc: freebsd-scsi@freebsd.org, Kenneth Merry Subject: Re: MFC latest isp(4) driver into 7.3? 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: Mon, 01 Mar 2010 19:37:07 -0000 Matthew Jacob wrote: > > RELENG_7, RELENG_8 and HEAD all contain the same isp bits. Great news! Since 7.3 is still at RC1 you could give it one more try and ask the release engineering team to include it in the upcoming 7.3 release. The current version includes so much additional functionality. It allows me to use effectively our Clariion CX3-40, use multipathing and also supports our latest Quantum Scalar50 tape library. Could you also update the ispfw code/firmware? Thank you, Panagiotis -- Panagiotis J. Christias Network Management Center p.christias@noc.ntua.gr National Technical Univ. of Athens, GREECE From owner-freebsd-scsi@FreeBSD.ORG Mon Mar 1 19:38:38 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 01807106566B; Mon, 1 Mar 2010 19:38:38 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id CEF768FC08; Mon, 1 Mar 2010 19:38:37 +0000 (UTC) Received: from [192.168.221.2] (remotevpn [192.168.221.2]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o21JcaMn033119 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 1 Mar 2010 11:38:37 -0800 (PST) (envelope-from mj@feral.com) Message-ID: <4B8C17BC.5050603@feral.com> Date: Mon, 01 Mar 2010 11:38:36 -0800 From: Matthew Jacob Organization: Feral Software User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc11 Thunderbird/3.0.1 MIME-Version: 1.0 To: Panagiotis Christias References: <20100210001536.GA71093@noc.ntua.gr> <20100221053723.GA85983@noc.ntua.gr> <4B80E52B.4080400@feral.com> <4B85AA46.2000804@noc.ntua.gr> <4B8BFD97.1040609@feral.com> <4B8C1759.3050801@noc.ntua.gr> In-Reply-To: <4B8C1759.3050801@noc.ntua.gr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.168.221.1]); Mon, 01 Mar 2010 11:38:37 -0800 (PST) Cc: freebsd-scsi@freebsd.org, Kenneth Merry Subject: Re: MFC latest isp(4) driver into 7.3? X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mjacob@freebsd.org List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 19:38:38 -0000 On 03/01/2010 11:36 AM, Panagiotis Christias wrote: > Could you also update the ispfw code/firmware? Hmm. Thanks for the reminder! Please feel free to talk to re@ directly. I think I've made as much of a case as I can. From owner-freebsd-scsi@FreeBSD.ORG Tue Mar 2 15:24:48 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 1298C1065675; Tue, 2 Mar 2010 15:24:48 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-qy0-f194.google.com (mail-qy0-f194.google.com [209.85.221.194]) by mx1.freebsd.org (Postfix) with ESMTP id ACD318FC16; Tue, 2 Mar 2010 15:24:47 +0000 (UTC) Received: by qyk32 with SMTP id 32so172387qyk.28 for ; Tue, 02 Mar 2010 07:24:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=85HyREaHgbEx8LGd/Me/aEEaw9fMOXQbVnwQJl7y5O4=; b=m3v0NpmfoEzT5Q1sl/E7I7QRwRidQZ1tRWTisIyRjjUePCEx+5M6mZfR41wH+wAcT2 XYedLkXkTDLUR8ADL8jgoPT4VaoJGnGYIJefTtApdiCivtuwPcwJZC3bXfUeySqrIuQf phW7V9n0jq8suJQr14sIyL6nrE45w/k0sGF24= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=YoIEtiHdzCQAYgysdxhmAN/9blA1iwmyZixISbb7xWc+F+wgqOjeNCI0TlsVd6oEf5 aG/1hACa99JKz75l6R1VG6y+tCAAcY8cAoSvHvdx0fkmcxpE5oOVpI2sktCxElJN3mQg CNTXf2K17AvLQzLOgMFE/fiwfo8ARxOzNXEnU= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.224.66.129 with SMTP id n1mr3365577qai.220.1267543479689; Tue, 02 Mar 2010 07:24:39 -0800 (PST) In-Reply-To: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> References: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> Date: Tue, 2 Mar 2010 16:24:39 +0100 X-Google-Sender-Auth: 48c769c099cf82cf Message-ID: <3bbf2fe11003020724m14bebf74y9fa3906418b7cf11@mail.gmail.com> From: Attilio Rao To: freebsd-scsi@freebsd.org Content-Type: text/plain; charset=UTF-8 Cc: "Justin T. Gibbs" Subject: Re: How is supposed to be protected the units list? 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: Tue, 02 Mar 2010 15:24:48 -0000 2010/3/1 Attilio Rao : > Hello, > I have a question that I've been unable to reply reading the code. > Someone could point me to documentation explaining how the unit tailq > (within a struct periph_driver) is supposed to be locked? > I'm not sure how it is assured consistency of accesses to the list and > more important how is ensured that the periphs composing it doesn't go > away as I don't see any reference bump for objects inserted there. I don't think the lists are protected at all so I made this simple patch taking advantage by a global lock: http://www.freebsd.org/~attilio/Sandvine/pdrv/pdrv_lock.diff The patch is simple enough but I just test-compiled it (will need some time to run in a debugging kernel, hope to do tonight) and maybe you can already give your opinions here. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-scsi@FreeBSD.ORG Tue Mar 2 15:34:41 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 D76C8106564A for ; Tue, 2 Mar 2010 15:34:41 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id B28458FC14 for ; Tue, 2 Mar 2010 15:34:41 +0000 (UTC) Received: from [192.168.0.101] (m206-63.dsl.tsoft.com [198.144.206.63]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o22FYf30009394 for ; Tue, 2 Mar 2010 07:34:41 -0800 (PST) (envelope-from mj@feral.com) Message-ID: <4B8D3016.2070301@feral.com> Date: Tue, 02 Mar 2010 07:34:46 -0800 From: Matthew Jacob User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100216 Thunderbird/3.0.2 MIME-Version: 1.0 To: freebsd-scsi@freebsd.org References: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> <3bbf2fe11003020724m14bebf74y9fa3906418b7cf11@mail.gmail.com> In-Reply-To: <3bbf2fe11003020724m14bebf74y9fa3906418b7cf11@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.67.166.1]); Tue, 02 Mar 2010 07:34:41 -0800 (PST) Subject: Re: How is supposed to be protected the units list? 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: Tue, 02 Mar 2010 15:34:41 -0000 I will admit to not looking at this stuff closely. But I'll also test with this today and give back an opinion. I would really like to hear Scott, Ken, Alexander or Justin express an opinion on this. > 2010/3/1 Attilio Rao: > >> Hello, >> I have a question that I've been unable to reply reading the code. >> Someone could point me to documentation explaining how the unit tailq >> (within a struct periph_driver) is supposed to be locked? >> I'm not sure how it is assured consistency of accesses to the list and >> more important how is ensured that the periphs composing it doesn't go >> away as I don't see any reference bump for objects inserted there. >> > I don't think the lists are protected at all so I made this simple > patch taking advantage by a global lock: > http://www.freebsd.org/~attilio/Sandvine/pdrv/pdrv_lock.diff > > The patch is simple enough but I just test-compiled it (will need some > time to run in a debugging kernel, hope to do tonight) and maybe you > can already give your opinions here. > > Thanks, > Attilio > > > From owner-freebsd-scsi@FreeBSD.ORG Wed Mar 3 21:34:40 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 709B51065673 for ; Wed, 3 Mar 2010 21:34:40 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-qy0-f183.google.com (mail-qy0-f183.google.com [209.85.221.183]) by mx1.freebsd.org (Postfix) with ESMTP id 26B498FC1D for ; Wed, 3 Mar 2010 21:34:39 +0000 (UTC) Received: by qyk14 with SMTP id 14so1852957qyk.9 for ; Wed, 03 Mar 2010 13:34:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=aYKp42tsMka+QI3CfKgwOuz6x5NoTaUwEoejrndCvO4=; b=xgLq/rnvuz0IkKttnSPlMgtjGfnqZ1HBOz2xe+XlocZTlvE0EnFCbheg/1h7gT7EMq Kcc0xxRDyv3qMUpO5ifBHRRfH1q9AIBgrE9eAJAp3AmtN/26nN6PEgXFF1bY/jvpfbkY PpC3Ye8VBwU2zOLmtga74mbqOB6/iKS9USkVQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=wEnni3YILRGxmFRVF47Bkued+ksk5SdfBqOBWNrZnk6uPXsx+d9bQrpFRqN9GZ+HvG QM5Bo5JBmbMtJIfLIcM3Vfsjlbw8Hzoc8r84m61ue5NnW+0uYD5WHv1PTyRFZ41aqtDz qHqt2f6g+41dIoUiMGxFRgOUIf4rFsq7brJxE= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.224.58.168 with SMTP id g40mr504270qah.93.1267652076148; Wed, 03 Mar 2010 13:34:36 -0800 (PST) In-Reply-To: <4B8D3016.2070301@feral.com> References: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> <3bbf2fe11003020724m14bebf74y9fa3906418b7cf11@mail.gmail.com> <4B8D3016.2070301@feral.com> Date: Wed, 3 Mar 2010 22:34:36 +0100 X-Google-Sender-Auth: 4d6b1edb7ddcea81 Message-ID: <3bbf2fe11003031334g4591c1a3lc52dfb898f728ee2@mail.gmail.com> From: Attilio Rao To: Matthew Jacob Content-Type: text/plain; charset=UTF-8 Cc: freebsd-scsi@freebsd.org Subject: Re: How is supposed to be protected the units list? 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: Wed, 03 Mar 2010 21:34:40 -0000 2010/3/2 Matthew Jacob : > I will admit to not looking at this stuff closely. But I'll also test with > this today and give back an opinion. > I would really like to hear Scott, Ken, Alexander or Justin express an > opinion on this. So I stress-tested the patch for several hours (6-7) with a stress-test that could reproduce the bug for us, on a debugging kernel, and it didn't panic'ed or showed LORs, deadlock, etc. If someone could offer time for reviews or futher examinations it would be very much appreciated. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-scsi@FreeBSD.ORG Wed Mar 3 21:48:39 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 B4CEE106564A; Wed, 3 Mar 2010 21:48:39 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-qy0-f183.google.com (mail-qy0-f183.google.com [209.85.221.183]) by mx1.freebsd.org (Postfix) with ESMTP id 4F4208FC2A; Wed, 3 Mar 2010 21:48:39 +0000 (UTC) Received: by qyk14 with SMTP id 14so1870799qyk.9 for ; Wed, 03 Mar 2010 13:48:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=QCQQMmj/k+jZSCQQGN/hdgfMO1mGAW0iROpDYcqTAdk=; b=d7sV6QF6BddPUl7h4l+5/MxSoGv1pxvZnBV//AtBdi6DbLyIWhbNh89sIoBVeDUbxJ LS/WkKGqlljvIaFSroOMSxn2D1+dWsnY2tmPYOHZQ7E427hQhhP5FThWfZrXRf9dVnYq 8fY/x9+Y44SYbU7Tv2hfG1jhcFkXThstnt4ho= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=BVFw4EeILMt3hvejn5d8aP4F/DHqbuzaVw4YGQefP6vXF9B2NC6vhCtT0qQY4d7HEM /HEojIlAzxYbC++PgjAjfSqU1aHEJQsfypf9lxCP9duMzAx2ddOQTj29Q+iddv5k23MH Hl0QPwK+WRsm/w9JFJ3TrHVXulVenxqdbj+PI= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.224.43.136 with SMTP id w8mr1560265qae.209.1267652911375; Wed, 03 Mar 2010 13:48:31 -0800 (PST) In-Reply-To: <20100303214424.GA53790@sandvine.com> References: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> <3bbf2fe11003020724m14bebf74y9fa3906418b7cf11@mail.gmail.com> <4B8D3016.2070301@feral.com> <3bbf2fe11003031334g4591c1a3lc52dfb898f728ee2@mail.gmail.com> <20100303214424.GA53790@sandvine.com> Date: Wed, 3 Mar 2010 22:48:31 +0100 X-Google-Sender-Auth: 392640e6d5408892 Message-ID: <3bbf2fe11003031348q4c1fcccfxd19da32875b43f56@mail.gmail.com> From: Attilio Rao To: Ed Maste Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-scsi@freebsd.org, Matthew Jacob Subject: Re: How is supposed to be protected the units list? 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: Wed, 03 Mar 2010 21:48:39 -0000 2010/3/3 Ed Maste : > On Wed, Mar 03, 2010 at 10:34:36PM +0100, Attilio Rao wrote: > >> So I stress-tested the patch for several hours (6-7) with a >> stress-test that could reproduce the bug for us, on a debugging >> kernel, and it didn't panic'ed or showed LORs, deadlock, etc. >> >> If someone could offer time for reviews or futher examinations it >> would be very much appreciated. > > I reviewed the patch and am happy with it. =C2=A0My only comment is to > consider using macros for the lock/unlock; it seems to be a pretty > common idiom. > > #define FOO_LOCK_INIT() =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\ > =C2=A0 =C2=A0mtx_init(&foo_mtx, "foo lock", NULL, MTX_DEF) > #define FOO_LOCK_ASSERT() =C2=A0 =C2=A0 =C2=A0 mtx_assert(&foo_mtx, MA_OW= NED) > #define FOO_LOCK() =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0mtx_lo= ck(&foo_mtx) > #define FOO_UNLOCK() =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0mtx_unlock(= &foo_mtx) Well, using functions will allow us to not exort the "foo_mtx" symbol, something I want to avoid. Such idiot is mostly better when the mutex is part of the ABI. Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-freebsd-scsi@FreeBSD.ORG Wed Mar 3 21:49:56 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 2F0C4106566C for ; Wed, 3 Mar 2010 21:49:56 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id 061EE8FC15 for ; Wed, 3 Mar 2010 21:49:55 +0000 (UTC) Received: from [192.168.221.2] (remotevpn [192.168.221.2]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o23LnsOM023564 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 3 Mar 2010 13:49:55 -0800 (PST) (envelope-from mj@feral.com) Message-ID: <4B8ED982.6010108@feral.com> Date: Wed, 03 Mar 2010 13:49:54 -0800 From: Matthew Jacob Organization: Feral Software User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc11 Thunderbird/3.0.3 MIME-Version: 1.0 To: Attilio Rao References: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> <3bbf2fe11003020724m14bebf74y9fa3906418b7cf11@mail.gmail.com> <4B8D3016.2070301@feral.com> <3bbf2fe11003031334g4591c1a3lc52dfb898f728ee2@mail.gmail.com> In-Reply-To: <3bbf2fe11003031334g4591c1a3lc52dfb898f728ee2@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.168.221.1]); Wed, 03 Mar 2010 13:49:55 -0800 (PST) Cc: freebsd-scsi@freebsd.org Subject: Re: How is supposed to be protected the units list? X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mj@feral.com List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 21:49:56 -0000 On 03/03/2010 01:34 PM, Attilio Rao wrote: > 2010/3/2 Matthew Jacob: > >> I will admit to not looking at this stuff closely. But I'll also test with >> this today and give back an opinion. >> I would really like to hear Scott, Ken, Alexander or Justin express an >> opinion on this. >> > So I stress-tested the patch for several hours (6-7) with a > stress-test that could reproduce the bug for us, on a debugging > kernel, and it didn't panic'ed or showed LORs, deadlock, etc. > > If someone could offer time for reviews or futher examinations it > would be very much appreciated. > > Thanks, > Attilio > > > I didn't get a chance to look at it more- work intervened. Have you tested with FC or SAS with drives arriving/departing a lot? From owner-freebsd-scsi@FreeBSD.ORG Wed Mar 3 21:55:53 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 09DB1106566C for ; Wed, 3 Mar 2010 21:55:53 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id D75388FC12 for ; Wed, 3 Mar 2010 21:55:52 +0000 (UTC) Received: from [192.168.221.2] (remotevpn [192.168.221.2]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o23LtqfG028171 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Wed, 3 Mar 2010 13:55:52 -0800 (PST) (envelope-from mj@feral.com) Message-ID: <4B8EDAE8.3080401@feral.com> Date: Wed, 03 Mar 2010 13:55:52 -0800 From: Matthew Jacob Organization: Feral Software User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc11 Thunderbird/3.0.3 MIME-Version: 1.0 To: freebsd-scsi@freebsd.org References: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> <3bbf2fe11003020724m14bebf74y9fa3906418b7cf11@mail.gmail.com> <4B8D3016.2070301@feral.com> <3bbf2fe11003031334g4591c1a3lc52dfb898f728ee2@mail.gmail.com> <20100303214424.GA53790@sandvine.com> <3bbf2fe11003031348q4c1fcccfxd19da32875b43f56@mail.gmail.com> In-Reply-To: <3bbf2fe11003031348q4c1fcccfxd19da32875b43f56@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.168.221.1]); Wed, 03 Mar 2010 13:55:52 -0800 (PST) Subject: Re: How is supposed to be protected the units list? X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mj@feral.com List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 21:55:53 -0000 On static review, the only code that makes me nervous are ata_shutdown/da_shutdown. Those are the only places where you hold that lock across an uncertain interval. From owner-freebsd-scsi@FreeBSD.ORG Wed Mar 3 21:56:27 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 0531A1065675 for ; Wed, 3 Mar 2010 21:56:27 +0000 (UTC) (envelope-from emaste@freebsd.org) Received: from mail2.sandvine.com (Mail1.sandvine.com [64.7.137.134]) by mx1.freebsd.org (Postfix) with ESMTP id C23F58FC14 for ; Wed, 3 Mar 2010 21:56:26 +0000 (UTC) Received: from labgw2.phaedrus.sandvine.com ([192.168.3.11]) by mail2.sandvine.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 3 Mar 2010 16:44:17 -0500 Received: by labgw2.phaedrus.sandvine.com (Postfix, from userid 10332) id 557D311653; Wed, 3 Mar 2010 16:44:24 -0500 (EST) Date: Wed, 3 Mar 2010 16:44:24 -0500 From: Ed Maste To: Attilio Rao Message-ID: <20100303214424.GA53790@sandvine.com> References: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> <3bbf2fe11003020724m14bebf74y9fa3906418b7cf11@mail.gmail.com> <4B8D3016.2070301@feral.com> <3bbf2fe11003031334g4591c1a3lc52dfb898f728ee2@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3bbf2fe11003031334g4591c1a3lc52dfb898f728ee2@mail.gmail.com> User-Agent: Mutt/1.4.2.1i X-OriginalArrivalTime: 03 Mar 2010 21:44:17.0850 (UTC) FILETIME=[ACF101A0:01CABB1A] Cc: freebsd-scsi@freebsd.org, Matthew Jacob Subject: Re: How is supposed to be protected the units list? 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: Wed, 03 Mar 2010 21:56:27 -0000 On Wed, Mar 03, 2010 at 10:34:36PM +0100, Attilio Rao wrote: > So I stress-tested the patch for several hours (6-7) with a > stress-test that could reproduce the bug for us, on a debugging > kernel, and it didn't panic'ed or showed LORs, deadlock, etc. > > If someone could offer time for reviews or futher examinations it > would be very much appreciated. I reviewed the patch and am happy with it. My only comment is to consider using macros for the lock/unlock; it seems to be a pretty common idiom. #define FOO_LOCK_INIT() \ mtx_init(&foo_mtx, "foo lock", NULL, MTX_DEF) #define FOO_LOCK_ASSERT() mtx_assert(&foo_mtx, MA_OWNED) #define FOO_LOCK() mtx_lock(&foo_mtx) #define FOO_UNLOCK() mtx_unlock(&foo_mtx) Regards, Ed From owner-freebsd-scsi@FreeBSD.ORG Wed Mar 3 21:57:31 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 88752106566B for ; Wed, 3 Mar 2010 21:57:31 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.24]) by mx1.freebsd.org (Postfix) with ESMTP id 3E7978FC1A for ; Wed, 3 Mar 2010 21:57:30 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 8so355685qwh.7 for ; Wed, 03 Mar 2010 13:57:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=A55CZu6IGVMbR+OCH5bqweIqZ3tW1oglgFsUd3aNu4o=; b=REeqgiMbh7LrhKo36tspRTNBnSFlUudt3t7zhlWmUyqHTtE6Aa4HqDtf5BRccw1TiL uwYxGAi1RZZdXCKyZtVvL8LjmYyduXmOpWgHwTchYe9L0Jxuyfx0Fz5lkTOhGLUNtTsb e6I10rGhN9uJH8gbvzCzVPuzzf9rJ3cYZUQSk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=r6NXPK8i/fEXOpTRViGL8a/lsbYcTpclUye+EpZnls3p9KI65EtR10AEjKMOD7ksw0 /hmeWaKLKvXwhWk01EWf5nwsFm8R9FLjQHyoR+yR55CQIrMEoyDarutNBKTRoxUV+C7x dVY9Ar18Qfjsq/KRpl7T+PCvtmT8sTwN1sqQI= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.224.41.137 with SMTP id o9mr527762qae.136.1267653442016; Wed, 03 Mar 2010 13:57:22 -0800 (PST) In-Reply-To: <4B8EDAE8.3080401@feral.com> References: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> <3bbf2fe11003020724m14bebf74y9fa3906418b7cf11@mail.gmail.com> <4B8D3016.2070301@feral.com> <3bbf2fe11003031334g4591c1a3lc52dfb898f728ee2@mail.gmail.com> <20100303214424.GA53790@sandvine.com> <3bbf2fe11003031348q4c1fcccfxd19da32875b43f56@mail.gmail.com> <4B8EDAE8.3080401@feral.com> Date: Wed, 3 Mar 2010 22:57:21 +0100 X-Google-Sender-Auth: 356935db693c2104 Message-ID: <3bbf2fe11003031357o518d6028m8157d9110a9122f3@mail.gmail.com> From: Attilio Rao To: mj@feral.com Content-Type: text/plain; charset=UTF-8 Cc: freebsd-scsi@freebsd.org Subject: Re: How is supposed to be protected the units list? 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: Wed, 03 Mar 2010 21:57:31 -0000 2010/3/3 Matthew Jacob : > On static review, the only code that makes me nervous are > ata_shutdown/da_shutdown. > Those are the only places where you hold that lock across an uncertain > interval. Please note that a def mutex is already held (the cam_periph_lock), so, unless LORs I'm not thinking about, I don't expect too much surprises for that codepath. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-scsi@FreeBSD.ORG Wed Mar 3 23:30:42 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 E45BA106564A for ; Wed, 3 Mar 2010 23:30:42 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id 9E2408FC0A for ; Wed, 3 Mar 2010 23:30:42 +0000 (UTC) Received: from [192.168.0.101] (m206-63.dsl.tsoft.com [198.144.206.63]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o23NUgHC097023 for ; Wed, 3 Mar 2010 15:30:42 -0800 (PST) (envelope-from mj@feral.com) Message-ID: <4B8EF128.8050704@feral.com> Date: Wed, 03 Mar 2010 15:30:48 -0800 From: Matthew Jacob User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100216 Thunderbird/3.0.2 MIME-Version: 1.0 To: freebsd-scsi@freebsd.org References: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> <3bbf2fe11003020724m14bebf74y9fa3906418b7cf11@mail.gmail.com> <4B8D3016.2070301@feral.com> <3bbf2fe11003031334g4591c1a3lc52dfb898f728ee2@mail.gmail.com> <20100303214424.GA53790@sandvine.com> <3bbf2fe11003031348q4c1fcccfxd19da32875b43f56@mail.gmail.com> <4B8EDAE8.3080401@feral.com> <3bbf2fe11003031357o518d6028m8157d9110a9122f3@mail.gmail.com> In-Reply-To: <3bbf2fe11003031357o518d6028m8157d9110a9122f3@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.67.166.1]); Wed, 03 Mar 2010 15:30:42 -0800 (PST) Subject: Re: How is supposed to be protected the units list? 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: Wed, 03 Mar 2010 23:30:43 -0000 On 3/3/2010 1:57 PM, Attilio Rao wrote: > 2010/3/3 Matthew Jacob: > >> On static review, the only code that makes me nervous are >> ata_shutdown/da_shutdown. >> Those are the only places where you hold that lock across an uncertain >> interval. >> > Please note that a def mutex is already held (the cam_periph_lock), > so, unless LORs I'm not thinking about, I don't expect too much > surprises for that codepath. > > Thanks, > Attilio > > > The only potential operational difference was on reattach (power SAN disks on, they attach. Power them off. Wait for 60 seconds. The deattach. Power them on again). I've run this test many times before and haven't seen this. da7: 34732MB (71132959 512 byte sectors: 255H 63S/T 4427C) (da7:isp0:0:6:0): removing device entry panic: Bad link elm 0xffffff0018fbbc00 next->prev != elm cpuid = 0 KDB: enter: panic [ thread pid 0 tid 100044 ] Stopped at kdb_enter+0x3d: movq $0,0x6b02d0(%rip) db> bt Tracing pid 0 tid 100044 td 0xffffff0002fbe000 kdb_enter() at kdb_enter+0x3d panic() at panic+0x17b camperiphfree() at camperiphfree+0x1c2 cam_periph_release_locked() at cam_periph_release_locked+0x48 cam_periph_release() at cam_periph_release+0x53 dasysctlinit() at dasysctlinit+0x153 taskqueue_run() at taskqueue_run+0x91 taskqueue_thread_loop() at taskqueue_thread_loop+0x3f fork_exit() at fork_exit+0x12a fork_trampoline() at fork_trampoline+0xe --- trap 0, rip = 0, rsp = 0xffffff8000188d30, rbp = 0 --- From owner-freebsd-scsi@FreeBSD.ORG Wed Mar 3 23:32:47 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 5FE761065675 for ; Wed, 3 Mar 2010 23:32:47 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-iw0-f191.google.com (mail-iw0-f191.google.com [209.85.223.191]) by mx1.freebsd.org (Postfix) with ESMTP id 210A38FC26 for ; Wed, 3 Mar 2010 23:32:46 +0000 (UTC) Received: by iwn29 with SMTP id 29so1269573iwn.27 for ; Wed, 03 Mar 2010 15:32:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=gKuQfxiuq+N0+MBDoMlzQZhX0DqtVRsr/+aKMVldBuU=; b=HpkTLvTFJdF57iGZM6HiCGitNsh7jMAHaV1aXkrDwbGWCn8byR/Z9XGKoXLLbYPqCy 7LwEHN/sRw5twp11dG9BwQCvxScsrSOOjJmu6Ls79QqfJgTtkSAhERFYytgmjguA5xOM 3DZ7fj/3TPsbSE8b0pZvNFtNeKfczldWQwW08= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=TAFPlub6GZE9X3B2J2pH2zwdBc4ciUYSz1zbFINBz2bZkL47bAgp66PIFzfOLHZtbW wPB8nHexRCOaj53wcMzsKvtK6EC1oi8fqAGRIjOXfuhvsqjLeVo5mbVj0T5V8jUWIpgI gl9X3UeTKaNHsNVxAspr/bq7mLxaCs5vQdyJc= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.231.155.18 with SMTP id q18mr504225ibw.80.1267659157113; Wed, 03 Mar 2010 15:32:37 -0800 (PST) In-Reply-To: <4B8EF128.8050704@feral.com> References: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> <3bbf2fe11003020724m14bebf74y9fa3906418b7cf11@mail.gmail.com> <4B8D3016.2070301@feral.com> <3bbf2fe11003031334g4591c1a3lc52dfb898f728ee2@mail.gmail.com> <20100303214424.GA53790@sandvine.com> <3bbf2fe11003031348q4c1fcccfxd19da32875b43f56@mail.gmail.com> <4B8EDAE8.3080401@feral.com> <3bbf2fe11003031357o518d6028m8157d9110a9122f3@mail.gmail.com> <4B8EF128.8050704@feral.com> Date: Thu, 4 Mar 2010 00:32:37 +0100 X-Google-Sender-Auth: e4344d2ff5153b38 Message-ID: <3bbf2fe11003031532u2207eb55h19c3a045215a7d84@mail.gmail.com> From: Attilio Rao To: Matthew Jacob Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-scsi@freebsd.org Subject: Re: How is supposed to be protected the units list? 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: Wed, 03 Mar 2010 23:32:47 -0000 2010/3/4 Matthew Jacob : > On 3/3/2010 1:57 PM, Attilio Rao wrote: >> >> 2010/3/3 Matthew Jacob: >> >>> >>> On static review, the only code that makes me nervous are >>> ata_shutdown/da_shutdown. >>> Those are the only places where you hold that lock across an uncertain >>> interval. >>> >> >> Please note that a def mutex is already held (the cam_periph_lock), >> so, unless LORs I'm not thinking about, I don't expect too much >> surprises for that codepath. >> >> Thanks, >> Attilio >> >> >> > > The only potential operational difference was on reattach (power SAN disk= s > on, they attach. Power them off. Wait for 60 seconds. The deattach. Power > them on again). I've run this test many times before and haven't seen thi= s. > > da7: 34732MB (71132959 512 byte sectors: 255H 63S/T 4427C) > (da7:isp0:0:6:0): removing device entry > panic: Bad link elm 0xffffff0018fbbc00 next->prev !=3D elm > cpuid =3D 0 > KDB: enter: panic > [ thread pid 0 tid 100044 ] > Stopped at =C2=A0 =C2=A0 =C2=A0kdb_enter+0x3d: movq =C2=A0 =C2=A0$0,0x6b0= 2d0(%rip) > db> bt > Tracing pid 0 tid 100044 td 0xffffff0002fbe000 > kdb_enter() at kdb_enter+0x3d > panic() at panic+0x17b > camperiphfree() at camperiphfree+0x1c2 > cam_periph_release_locked() at cam_periph_release_locked+0x48 > cam_periph_release() at cam_periph_release+0x53 > dasysctlinit() at dasysctlinit+0x153 > taskqueue_run() at taskqueue_run+0x91 > taskqueue_thread_loop() at taskqueue_thread_loop+0x3f > fork_exit() at fork_exit+0x12a > fork_trampoline() at fork_trampoline+0xe > --- trap 0, rip =3D 0, rsp =3D 0xffffff8000188d30, rbp =3D 0 --- Is this with the patch or without? Thanks, Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-freebsd-scsi@FreeBSD.ORG Wed Mar 3 23:39:28 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 B08AE106566B for ; Wed, 3 Mar 2010 23:39:28 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id 894468FC1A for ; Wed, 3 Mar 2010 23:39:28 +0000 (UTC) Received: from [192.168.0.101] (m206-63.dsl.tsoft.com [198.144.206.63]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o23NdRSW097085 for ; Wed, 3 Mar 2010 15:39:28 -0800 (PST) (envelope-from mj@feral.com) Message-ID: <4B8EF336.80107@feral.com> Date: Wed, 03 Mar 2010 15:39:34 -0800 From: Matthew Jacob User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100216 Thunderbird/3.0.2 MIME-Version: 1.0 To: freebsd-scsi@freebsd.org References: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> <3bbf2fe11003020724m14bebf74y9fa3906418b7cf11@mail.gmail.com> <4B8D3016.2070301@feral.com> <3bbf2fe11003031334g4591c1a3lc52dfb898f728ee2@mail.gmail.com> <20100303214424.GA53790@sandvine.com> <3bbf2fe11003031348q4c1fcccfxd19da32875b43f56@mail.gmail.com> <4B8EDAE8.3080401@feral.com> <3bbf2fe11003031357o518d6028m8157d9110a9122f3@mail.gmail.com> <4B8EF128.8050704@feral.com> <3bbf2fe11003031532u2207eb55h19c3a045215a7d84@mail.gmail.com> In-Reply-To: <3bbf2fe11003031532u2207eb55h19c3a045215a7d84@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.67.166.1]); Wed, 03 Mar 2010 15:39:28 -0800 (PST) Subject: Re: How is supposed to be protected the units list? 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: Wed, 03 Mar 2010 23:39:28 -0000 With --- > Is this with the patch or without? > > Thanks, > Attilio > > > From owner-freebsd-scsi@FreeBSD.ORG Wed Mar 3 23:47:57 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 CCE48106564A for ; Wed, 3 Mar 2010 23:47:57 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-iw0-f191.google.com (mail-iw0-f191.google.com [209.85.223.191]) by mx1.freebsd.org (Postfix) with ESMTP id 8EF9D8FC13 for ; Wed, 3 Mar 2010 23:47:57 +0000 (UTC) Received: by iwn29 with SMTP id 29so1275685iwn.27 for ; Wed, 03 Mar 2010 15:47:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=V9bayRWsSJzw7bF8hwbC78BwXSCi84CNQJq+urlzwug=; b=pz6ovCc/YpV8lddTehFBafeOv7ViSmG3lX+DKcWx20LNWqB0c8mKucB3d8ggG9/eUa zEisOXUHbQg6m21vqoNRnTw4vC03pWrrgs1pordiK9sgIqtnnb2bdCtvHc6T8ietAE8k KcuaK+sfXxMlWf8Bba4yEP25RyCNKg1N6zzG0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=h3dcRhg5X6G8UeKkV2gfkAiRB/ydkpJsTUYxvfszt05zAUEZmcbv6UeZohxheZD7aY gJf24bxuRzZW7t1RsJqcI1Gd4uRXMvFNp3qs7iw3EjaBtOsyH86Eqsq/K4t6Jz9fjx05 m429JsDCJmcfaxH949hHGfJNcufPCTpWzG9cE= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.231.85.205 with SMTP id p13mr575369ibl.8.1267660070358; Wed, 03 Mar 2010 15:47:50 -0800 (PST) In-Reply-To: <4B8EF336.80107@feral.com> References: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> <4B8D3016.2070301@feral.com> <3bbf2fe11003031334g4591c1a3lc52dfb898f728ee2@mail.gmail.com> <20100303214424.GA53790@sandvine.com> <3bbf2fe11003031348q4c1fcccfxd19da32875b43f56@mail.gmail.com> <4B8EDAE8.3080401@feral.com> <3bbf2fe11003031357o518d6028m8157d9110a9122f3@mail.gmail.com> <4B8EF128.8050704@feral.com> <3bbf2fe11003031532u2207eb55h19c3a045215a7d84@mail.gmail.com> <4B8EF336.80107@feral.com> Date: Thu, 4 Mar 2010 00:47:50 +0100 X-Google-Sender-Auth: c9cd1e9215051fc4 Message-ID: <3bbf2fe11003031547kd5f7314t3d83b2bde06c1c2f@mail.gmail.com> From: Attilio Rao To: Matthew Jacob Content-Type: text/plain; charset=UTF-8 Cc: freebsd-scsi@freebsd.org Subject: Re: How is supposed to be protected the units list? 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: Wed, 03 Mar 2010 23:47:57 -0000 2010/3/4 Matthew Jacob : > With > I assume you did use INVARIANTS, did you also include WITNESS? Also, do you have a coredump for it? Is this panic reproducible easilly? Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-scsi@FreeBSD.ORG Thu Mar 4 00:06:34 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 D0D541065700; Thu, 4 Mar 2010 00:06:34 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id 8C15C8FC1F; Thu, 4 Mar 2010 00:06:34 +0000 (UTC) Received: from [192.168.0.101] (m206-63.dsl.tsoft.com [198.144.206.63]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o2406Xo7097247; Wed, 3 Mar 2010 16:06:34 -0800 (PST) (envelope-from mj@feral.com) Message-ID: <4B8EF990.5030407@feral.com> Date: Wed, 03 Mar 2010 16:06:40 -0800 From: Matthew Jacob User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100216 Thunderbird/3.0.2 MIME-Version: 1.0 To: Attilio Rao References: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> <4B8D3016.2070301@feral.com> <3bbf2fe11003031334g4591c1a3lc52dfb898f728ee2@mail.gmail.com> <20100303214424.GA53790@sandvine.com> <3bbf2fe11003031348q4c1fcccfxd19da32875b43f56@mail.gmail.com> <4B8EDAE8.3080401@feral.com> <3bbf2fe11003031357o518d6028m8157d9110a9122f3@mail.gmail.com> <4B8EF128.8050704@feral.com> <3bbf2fe11003031532u2207eb55h19c3a045215a7d84@mail.gmail.com> <4B8EF336.80107@feral.com> <3bbf2fe11003031547kd5f7314t3d83b2bde06c1c2f@mail.gmail.com> In-Reply-To: <3bbf2fe11003031547kd5f7314t3d83b2bde06c1c2f@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.67.166.1]); Wed, 03 Mar 2010 16:06:34 -0800 (PST) Cc: freebsd-scsi@freebsd.org Subject: Re: How is supposed to be protected the units list? 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, 04 Mar 2010 00:06:34 -0000 On 3/3/2010 3:47 PM, Attilio Rao wrote: > 2010/3/4 Matthew Jacob: > >> With >> >> > I assume you did use INVARIANTS, did you also include WITNESS? > witness, yes, INVARIANTS yes, it was a GENERIC kernel less ahc so it runs on my box > Also, do you have a coredump for it? > Ah, not, sorry, was impatient. I need to port my core dump fixes to speed things up. It takes 20 minutes on this box to get a coredump. > Is this panic reproducible easilly? > Dunno. I'll try again. This time I'll let the core dump run through. From owner-freebsd-scsi@FreeBSD.ORG Thu Mar 4 00:08:02 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 1F85F1065672 for ; Thu, 4 Mar 2010 00:08:02 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-yw0-f204.google.com (mail-yw0-f204.google.com [209.85.211.204]) by mx1.freebsd.org (Postfix) with ESMTP id C0A628FC14 for ; Thu, 4 Mar 2010 00:08:01 +0000 (UTC) Received: by ywh42 with SMTP id 42so695767ywh.7 for ; Wed, 03 Mar 2010 16:07:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=dG3MsYNAORnRnFu4Q54OvB3gmyie1KNUnpB1CRun7C0=; b=p8e0Jfr+3lT8nVQtYgwI5nTA9EA2wBPhc7d4oEHJaTa2qpOFCF0ppv323bbtVRgFZT edaZkLB+ylS3zgNMX6jgGclYN1Iwu4JuRAGCUBzWU8i7AuvinKINwsSlaZg1xive4zyF DOb3gd3lVniEWq4uftXl4LaXNlv59dRDhsAtE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=xB3WIS1SmCjoB+2cgrBpM2hjxekXvrNTeBWoW67SKYjZA0+HsOPJeYpsoXFkk8dZ/A jFmGjif6K/EIKXRlexX+fqn/Lk7tzjQ611V33tJZlzNDp4C7ibBSlkrlU3UVI6X4z6/L lqpci89OeqyuKVfeFuPVk+dLH7uMpTHvgNQxI= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.90.37.14 with SMTP id k14mr1680871agk.53.1267661270357; Wed, 03 Mar 2010 16:07:50 -0800 (PST) In-Reply-To: <4B8EF990.5030407@feral.com> References: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> <20100303214424.GA53790@sandvine.com> <3bbf2fe11003031348q4c1fcccfxd19da32875b43f56@mail.gmail.com> <4B8EDAE8.3080401@feral.com> <3bbf2fe11003031357o518d6028m8157d9110a9122f3@mail.gmail.com> <4B8EF128.8050704@feral.com> <3bbf2fe11003031532u2207eb55h19c3a045215a7d84@mail.gmail.com> <4B8EF336.80107@feral.com> <3bbf2fe11003031547kd5f7314t3d83b2bde06c1c2f@mail.gmail.com> <4B8EF990.5030407@feral.com> Date: Thu, 4 Mar 2010 01:07:50 +0100 X-Google-Sender-Auth: d6516efbb859c178 Message-ID: <3bbf2fe11003031607wa3727b5ke89bc2a909d4d6a6@mail.gmail.com> From: Attilio Rao To: Matthew Jacob Content-Type: text/plain; charset=UTF-8 Cc: freebsd-scsi@freebsd.org Subject: Re: How is supposed to be protected the units list? 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, 04 Mar 2010 00:08:02 -0000 2010/3/4 Matthew Jacob : > On 3/3/2010 3:47 PM, Attilio Rao wrote: >> >> 2010/3/4 Matthew Jacob: >> >>> >>> With >>> >>> >> >> I assume you did use INVARIANTS, did you also include WITNESS? >> > > witness, yes, INVARIANTS yes, it was a GENERIC kernel less ahc so it runs on > my box > >> Also, do you have a coredump for it? >> > > Ah, not, sorry, was impatient. I need to port my core dump fixes to speed > things up. It takes 20 minutes on this box to get a coredump. > >> Is this panic reproducible easilly? >> > > Dunno. I'll try again. This time I'll let the core dump run through. Otherwise you can check out if the panic happens exactly on the units list or it is somewhere else like xpt_remove_periph(), etc. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-scsi@FreeBSD.ORG Thu Mar 4 00:14:10 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 F3BA6106564A for ; Thu, 4 Mar 2010 00:14:09 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id CAA4A8FC18 for ; Thu, 4 Mar 2010 00:14:09 +0000 (UTC) Received: from [192.168.0.101] (m206-63.dsl.tsoft.com [198.144.206.63]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o240E9lw097356 for ; Wed, 3 Mar 2010 16:14:09 -0800 (PST) (envelope-from mj@feral.com) Message-ID: <4B8EFB57.40009@feral.com> Date: Wed, 03 Mar 2010 16:14:15 -0800 From: Matthew Jacob User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100216 Thunderbird/3.0.2 MIME-Version: 1.0 To: freebsd-scsi@freebsd.org References: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> <20100303214424.GA53790@sandvine.com> <3bbf2fe11003031348q4c1fcccfxd19da32875b43f56@mail.gmail.com> <4B8EDAE8.3080401@feral.com> <3bbf2fe11003031357o518d6028m8157d9110a9122f3@mail.gmail.com> <4B8EF128.8050704@feral.com> <3bbf2fe11003031532u2207eb55h19c3a045215a7d84@mail.gmail.com> <4B8EF336.80107@feral.com> <3bbf2fe11003031547kd5f7314t3d83b2bde06c1c2f@mail.gmail.com> <4B8EF990.5030407@feral.com> <3bbf2fe11003031607wa3727b5ke89bc2a909d4d6a6@mail.gmail.com> In-Reply-To: <3bbf2fe11003031607wa3727b5ke89bc2a909d4d6a6@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.67.166.1]); Wed, 03 Mar 2010 16:14:09 -0800 (PST) Subject: Re: How is supposed to be protected the units list? 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, 04 Mar 2010 00:14:10 -0000 Happened again in the same place. Collecting the core now. >> Dunno. I'll try again. This time I'll let the core dump run through. >> > Otherwise you can check out if the panic happens exactly on the units > list or it is somewhere else like xpt_remove_periph(), etc. > > Thanks, > Attilio > > > From owner-freebsd-scsi@FreeBSD.ORG Thu Mar 4 01:47:30 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 5446C106568C for ; Thu, 4 Mar 2010 01:47:30 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id D8ACF8FC1B for ; Thu, 4 Mar 2010 01:47:29 +0000 (UTC) Received: from [192.168.0.101] (m206-63.dsl.tsoft.com [198.144.206.63]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o241lTpw097851 for ; Wed, 3 Mar 2010 17:47:29 -0800 (PST) (envelope-from mj@feral.com) Message-ID: <4B8F1137.7070102@feral.com> Date: Wed, 03 Mar 2010 17:47:35 -0800 From: Matthew Jacob User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100216 Thunderbird/3.0.2 MIME-Version: 1.0 To: freebsd-scsi@freebsd.org References: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> <3bbf2fe11003020724m14bebf74y9fa3906418b7cf11@mail.gmail.com> <4B8D3016.2070301@feral.com> <3bbf2fe11003031334g4591c1a3lc52dfb898f728ee2@mail.gmail.com> <20100303214424.GA53790@sandvine.com> <3bbf2fe11003031348q4c1fcccfxd19da32875b43f56@mail.gmail.com> <4B8EDAE8.3080401@feral.com> <3bbf2fe11003031357o518d6028m8157d9110a9122f3@mail.gmail.com> In-Reply-To: <3bbf2fe11003031357o518d6028m8157d9110a9122f3@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.67.166.1]); Wed, 03 Mar 2010 17:47:29 -0800 (PST) Subject: Re: How is supposed to be protected the units list? 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, 04 Mar 2010 01:47:30 -0000 On 3/3/2010 1:57 PM, Attilio Rao wrote: So sad, the core file produced is not usable. Que lastima. From owner-freebsd-scsi@FreeBSD.ORG Thu Mar 4 01:52:38 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 AF77C106564A for ; Thu, 4 Mar 2010 01:52:38 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-iw0-f183.google.com (mail-iw0-f183.google.com [209.85.223.183]) by mx1.freebsd.org (Postfix) with ESMTP id 71C068FC0C for ; Thu, 4 Mar 2010 01:52:38 +0000 (UTC) Received: by iwn13 with SMTP id 13so1715289iwn.14 for ; Wed, 03 Mar 2010 17:52:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=H8DbwtZ3ZTAKVFJTKGPDHEx+0WMHpOrnVVb2DXE4Zng=; b=UhuU0uCT+OlqdX0FGnjNSE3vsPiQSU23HqytRxjCSQqjI6lOz0ORJjLBlgcpXSYQ24 L0jqxcLllDvvnWes5lGt2WYiO2uy3x+7isXzubMRe6afllpPJF14RMSD5EFwxB9XUaKA gYpkxcFM1JnDZ2Pc9zLAqa6+gcE6keos6kiEk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=gXNJCJdx06ixz2a8FqRDIGAu2NVRKhlU3iXE25/0x7TJWf9dtcukNHEa4DX58zbd6L 9F868v0mkou5wj7aaViMMf0dyOq3N8FTqgiAVX1A+/PzH4aPJ8ODeVTkFGOh//at29ve evK6ZPWA3VldR4y6LctUUIxtEo/rfmB/lZ8wk= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.231.153.205 with SMTP id l13mr21154ibw.64.1267667550632; Wed, 03 Mar 2010 17:52:30 -0800 (PST) In-Reply-To: <4B8F1137.7070102@feral.com> References: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> <3bbf2fe11003020724m14bebf74y9fa3906418b7cf11@mail.gmail.com> <4B8D3016.2070301@feral.com> <3bbf2fe11003031334g4591c1a3lc52dfb898f728ee2@mail.gmail.com> <20100303214424.GA53790@sandvine.com> <3bbf2fe11003031348q4c1fcccfxd19da32875b43f56@mail.gmail.com> <4B8EDAE8.3080401@feral.com> <3bbf2fe11003031357o518d6028m8157d9110a9122f3@mail.gmail.com> <4B8F1137.7070102@feral.com> Date: Thu, 4 Mar 2010 02:52:30 +0100 X-Google-Sender-Auth: 3ba44269e414fb56 Message-ID: <3bbf2fe11003031752l5f9066a0nb511f097c81f726c@mail.gmail.com> From: Attilio Rao To: Matthew Jacob Content-Type: text/plain; charset=UTF-8 Cc: freebsd-scsi@freebsd.org Subject: Re: How is supposed to be protected the units list? 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, 04 Mar 2010 01:52:38 -0000 2010/3/4 Matthew Jacob : > On 3/3/2010 1:57 PM, Attilio Rao wrote: > > So sad, the core file produced is not usable. Que lastima. BTW, I'm having hard times thinking this patch introduces the problem, I think it is more likely it just changes the times of some events happening or, more likely, the problem should also happen without the patch. I wanted to check, however, which list is affected by this. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-scsi@FreeBSD.ORG Thu Mar 4 01:54:25 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 DF2611065673 for ; Thu, 4 Mar 2010 01:54:25 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id B5B728FC1C for ; Thu, 4 Mar 2010 01:54:25 +0000 (UTC) Received: from [192.168.0.101] (m206-63.dsl.tsoft.com [198.144.206.63]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o241sPdb097886 for ; Wed, 3 Mar 2010 17:54:25 -0800 (PST) (envelope-from mj@feral.com) Message-ID: <4B8F12D7.6070401@feral.com> Date: Wed, 03 Mar 2010 17:54:31 -0800 From: Matthew Jacob User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100216 Thunderbird/3.0.2 MIME-Version: 1.0 To: freebsd-scsi@freebsd.org References: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> <3bbf2fe11003020724m14bebf74y9fa3906418b7cf11@mail.gmail.com> <4B8D3016.2070301@feral.com> <3bbf2fe11003031334g4591c1a3lc52dfb898f728ee2@mail.gmail.com> <20100303214424.GA53790@sandvine.com> <3bbf2fe11003031348q4c1fcccfxd19da32875b43f56@mail.gmail.com> <4B8EDAE8.3080401@feral.com> <3bbf2fe11003031357o518d6028m8157d9110a9122f3@mail.gmail.com> <4B8F1137.7070102@feral.com> <3bbf2fe11003031752l5f9066a0nb511f097c81f726c@mail.gmail.com> In-Reply-To: <3bbf2fe11003031752l5f9066a0nb511f097c81f726c@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.67.166.1]); Wed, 03 Mar 2010 17:54:25 -0800 (PST) Subject: Re: How is supposed to be protected the units list? 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, 04 Mar 2010 01:54:25 -0000 I'd only say that is is possible that the patch *uncovers* an existing problem. >> So sad, the core file produced is not usable. Que lastima. >> > BTW, I'm having hard times thinking this patch introduces the problem, > I think it is more likely it just changes the times of some events > happening or, more likely, the problem should also happen without the > patch. > I wanted to check, however, which list is affected by this. > > Thanks, > Attilio > > > From owner-freebsd-scsi@FreeBSD.ORG Thu Mar 4 02:01:19 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 5789F1065670 for ; Thu, 4 Mar 2010 02:01:19 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id 2F24D8FC19 for ; Thu, 4 Mar 2010 02:01:18 +0000 (UTC) Received: from [192.168.0.101] (m206-63.dsl.tsoft.com [198.144.206.63]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o2421I6c098039 for ; Wed, 3 Mar 2010 18:01:18 -0800 (PST) (envelope-from mj@feral.com) Message-ID: <4B8F1475.10100@feral.com> Date: Wed, 03 Mar 2010 18:01:25 -0800 From: Matthew Jacob User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100216 Thunderbird/3.0.2 MIME-Version: 1.0 To: freebsd-scsi@freebsd.org References: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> <3bbf2fe11003020724m14bebf74y9fa3906418b7cf11@mail.gmail.com> <4B8D3016.2070301@feral.com> <3bbf2fe11003031334g4591c1a3lc52dfb898f728ee2@mail.gmail.com> <20100303214424.GA53790@sandvine.com> <3bbf2fe11003031348q4c1fcccfxd19da32875b43f56@mail.gmail.com> <4B8EDAE8.3080401@feral.com> <3bbf2fe11003031357o518d6028m8157d9110a9122f3@mail.gmail.com> <4B8F1137.7070102@feral.com> <3bbf2fe11003031752l5f9066a0nb511f097c81f726c@mail.gmail.com> <4B8F12D7.6070401@feral.com> In-Reply-To: <4B8F12D7.6070401@feral.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.67.166.1]); Wed, 03 Mar 2010 18:01:18 -0800 (PST) Subject: Re: How is supposed to be protected the units list? 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, 04 Mar 2010 02:01:19 -0000 On 3/3/2010 5:54 PM, Matthew Jacob wrote: > > I'd only say that is is possible that the patch *uncovers* an existing > problem. > It's HEAD. Barring a negative comment from Scott, Alexander or Justin, I'd say put it in. From owner-freebsd-scsi@FreeBSD.ORG Thu Mar 4 09:50:47 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 1847E106564A for ; Thu, 4 Mar 2010 09:50:47 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.156]) by mx1.freebsd.org (Postfix) with ESMTP id 98D4C8FC21 for ; Thu, 4 Mar 2010 09:50:46 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id 22so574882fge.13 for ; Thu, 04 Mar 2010 01:50:42 -0800 (PST) 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:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=a9/RRelV86yoNY0oEr4DrFWAr1eKHwIUNsTkpvMB8+E=; b=Zso9Z2aNRqpyje2sK1Ozz3cPoCfX48f5EiXXM90csGfZDfosqMhaCXyubIOKZ0SbKP wk0yGX+WsPNXcYieuucNkt/6pviSKv1BsxypJjUrsqZcA5xZ9oADaPU/WX/fJAEeSPkh rssyhNA4Bv0wEuV8yir5b4ftFd3pRxXQK7Dr8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=xhJqeXT8lbUwVRg+AcVz9b/zbguZiELZetWTU8ZLlGpJDEwMxhhRHJn9FcQcxdD7gt DsmsRC2OPERa2FRBWnMzzO9Mo9LmDeUNLq7X5zF3FrUbAQTGWpXHRIFjOQXAL1Zfeogt AUTa4EeOCrF0ZQtCvY+Tp1pXoW7uxs9Zpw2U4= Received: by 10.87.2.15 with SMTP id e15mr2156688fgi.22.1267694420576; Thu, 04 Mar 2010 01:20:20 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 15sm211369fxm.0.2010.03.04.01.20.19 (version=SSLv3 cipher=RC4-MD5); Thu, 04 Mar 2010 01:20:20 -0800 (PST) Sender: Alexander Motin Message-ID: <4B8F7B51.6050403@FreeBSD.org> Date: Thu, 04 Mar 2010 11:20:17 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Attilio Rao References: <1267417389.00224447.1267407002@10.7.7.3> <1267554183.00225132.1267543801@10.7.7.3> In-Reply-To: <1267554183.00225132.1267543801@10.7.7.3> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@freebsd.org, "Justin T. Gibbs" , Matthew Jacob Subject: Re: How is supposed to be protected the units list? 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, 04 Mar 2010 09:50:47 -0000 Hi. Attilio Rao wrote: > 2010/3/1 Attilio Rao : >> I have a question that I've been unable to reply reading the code. >> Someone could point me to documentation explaining how the unit tailq >> (within a struct periph_driver) is supposed to be locked? >> I'm not sure how it is assured consistency of accesses to the list and >> more important how is ensured that the periphs composing it doesn't go >> away as I don't see any reference bump for objects inserted there. I am not sure that existing implementation is complete, but at least in some places it is protected by xpt_lock_buses(), which is wrapper for mtx_lock(&xsoftc.xpt_topo_lock). camperiphfree() called under the lock, same as many (all?) traverses. > I don't think the lists are protected at all so I made this simple > patch taking advantage by a global lock: > http://www.freebsd.org/~attilio/Sandvine/pdrv/pdrv_lock.diff > > The patch is simple enough but I just test-compiled it (will need some > time to run in a debugging kernel, hope to do tonight) and maybe you > can already give your opinions here. It is not obvious to me, how your new lock expected to interoperate with existing xpt_topo_lock. I have feeling that it duplicates one in some places. If you believe that second lock is needed there, then probably first one should be partially removed. But then we should be careful to not create LORs between them, as they are not natively nested. Changes in cam_xpt.c break splbreaknum meaning of temporary dropping xpt_topo_lock. I have doubts whether it is required now at all now, but leaving dead code it definitely not good. -- Alexander Motin From owner-freebsd-scsi@FreeBSD.ORG Thu Mar 4 20:12:10 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 AB250106564A for ; Thu, 4 Mar 2010 20:12:10 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id 7F8D98FC13 for ; Thu, 4 Mar 2010 20:12:10 +0000 (UTC) Received: from [192.168.221.2] (remotevpn [192.168.221.2]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o24KC9Co049210 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Thu, 4 Mar 2010 12:12:10 -0800 (PST) (envelope-from mj@feral.com) Message-ID: <4B901419.8060800@feral.com> Date: Thu, 04 Mar 2010 12:12:09 -0800 From: Matthew Jacob Organization: Feral Software User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc11 Thunderbird/3.0.3 MIME-Version: 1.0 To: freebsd-scsi@freebsd.org References: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> <20100303214424.GA53790@sandvine.com> <3bbf2fe11003031348q4c1fcccfxd19da32875b43f56@mail.gmail.com> <4B8EDAE8.3080401@feral.com> <3bbf2fe11003031357o518d6028m8157d9110a9122f3@mail.gmail.com> <4B8EF128.8050704@feral.com> <3bbf2fe11003031532u2207eb55h19c3a045215a7d84@mail.gmail.com> <4B8EF336.80107@feral.com> <3bbf2fe11003031547kd5f7314t3d83b2bde06c1c2f@mail.gmail.com> <4B8EF990.5030407@feral.com> <3bbf2fe11003031607wa3727b5ke89bc2a909d4d6a6@mail.gmail.com> In-Reply-To: <3bbf2fe11003031607wa3727b5ke89bc2a909d4d6a6@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.168.221.1]); Thu, 04 Mar 2010 12:12:10 -0800 (PST) Subject: Re: How is supposed to be protected the units list? X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mj@feral.com List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 20:12:10 -0000 The referred to patch at least got me out of panic case :-).. http://people.freebsd.org/~mjacob/scsi_da.c.patch From owner-freebsd-scsi@FreeBSD.ORG Thu Mar 4 22:20:58 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 F38531065670; Thu, 4 Mar 2010 22:20:57 +0000 (UTC) (envelope-from aoyama@peach.ne.jp) Received: from moon.peach.ne.jp (unknown [IPv6:2001:380:e06:127::53]) by mx1.freebsd.org (Postfix) with ESMTP id 9E3AB8FC13; Thu, 4 Mar 2010 22:20:57 +0000 (UTC) Received: from moon.peach.ne.jp (localhost [127.0.0.1]) by moon.peach.ne.jp (Postfix) with ESMTP id 79AAD78C4B; Fri, 5 Mar 2010 07:20:49 +0900 (JST) Received: from artemis (unknown [192.168.2.20]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by moon.peach.ne.jp (Postfix) with ESMTP id 38F4A78C3B; Fri, 5 Mar 2010 07:20:49 +0900 (JST) Message-ID: <96BBFBFE5763434E8F65D8C503BABB2C@artemis> From: "Daisuke Aoyama" To: "Miroslav Lachman" <000.fbsd@quip.cz>, References: 4B5F1553.4070709@quip.cz <4B79DCA2.1070005@quip.cz> Date: Fri, 5 Mar 2010 07:20:45 +0900 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-2"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5843 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Virus-Scanned: ClamAV using ClamSMTP Cc: ivoras@freebsd.org Subject: Re: performance tuning of iSCSI and Dell MD3000i / gjournal problem 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, 04 Mar 2010 22:20:58 -0000 Hi, > And ZFS on iSCSI is the worst case with 5MB/s write performance! (I have > much better experiences with ZFS on RAIDZ pool of 4 SATA drives) I'm not sure but FreeBSD initiator does not support immediate operation. (ImmediateData=Yes) If the target supports it, the initiator can send data with the command up to the size in small one of FirstBurstLength and MaxRecvDataSegmentLength. Also the initiator can send more data up to FirstBurstLength if the target supports unsolicited operation. (InitialR2T=No) It will improve small writing performance and latency. In any case, each PDU must not exceed the target's MaxRecvDataSegmentLength. See RFC3720 page 213 and 217 for example of the sequence. http://tools.ietf.org/html/rfc3720#page-213 http://tools.ietf.org/html/rfc3720#page-217 If possible, try to increase MaxBurstLength both of the initiator and the target. It will decrease the number of R2T. Therefore, large writing is faster. Regards, Daisuke Aoyama From owner-freebsd-scsi@FreeBSD.ORG Fri Mar 5 01:34:01 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 8A7511065670; Fri, 5 Mar 2010 01:34:01 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-iw0-f173.google.com (mail-iw0-f173.google.com [209.85.223.173]) by mx1.freebsd.org (Postfix) with ESMTP id 354F48FC13; Fri, 5 Mar 2010 01:34:00 +0000 (UTC) Received: by iwn3 with SMTP id 3so2327220iwn.13 for ; Thu, 04 Mar 2010 17:33:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=emhZeRIzKs/UOjCNL10cTnHH2wQpsFUwFwvx229w+g8=; b=MsdV40fyLlofkTm9nduw24S7t4PP4ey743mjVy9/D34nN3lnHGbfz7XjJH3pLAWbUU DDbFGed3ovylsBDeSv4lvd0sPzEtK36rbj/KclP4P3zu6jolB3s8P3CSPoX/VyIBgwc/ NExroZUXHZ0V1GAn5XFAXKy4cqJOPHeIpJpHY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=QgSR8DeKgqrHPCaR4sDajCLgdkBdGyBKFO/7rC0QDbfZCv5d1WNK6B3Mpeu87GzCi6 Tgl7gYtXlZ9FscNT5kQUuNFRzQhV17JESIS+lQTEs6tRP163081T6avdcoq/i3Pzr/B/ K5hbBTnBbes0ha02LqSbGoYjaOXe1/skdmVhQ= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.231.154.8 with SMTP id m8mr101815ibw.2.1267752837632; Thu, 04 Mar 2010 17:33:57 -0800 (PST) In-Reply-To: <4B8F7B51.6050403@FreeBSD.org> References: <1267417389.00224447.1267407002@10.7.7.3> <1267554183.00225132.1267543801@10.7.7.3> <4B8F7B51.6050403@FreeBSD.org> Date: Fri, 5 Mar 2010 02:33:57 +0100 X-Google-Sender-Auth: e33e21368314cc1b Message-ID: <3bbf2fe11003041733x5325cdd8x5766551e22565a81@mail.gmail.com> From: Attilio Rao To: Alexander Motin Content-Type: text/plain; charset=UTF-8 Cc: freebsd-scsi@freebsd.org, "Justin T. Gibbs" , Matthew Jacob Subject: Re: How is supposed to be protected the units list? 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: Fri, 05 Mar 2010 01:34:01 -0000 2010/3/4 Alexander Motin : > Hi. > > Attilio Rao wrote: >> 2010/3/1 Attilio Rao : >>> I have a question that I've been unable to reply reading the code. >>> Someone could point me to documentation explaining how the unit tailq >>> (within a struct periph_driver) is supposed to be locked? >>> I'm not sure how it is assured consistency of accesses to the list and >>> more important how is ensured that the periphs composing it doesn't go >>> away as I don't see any reference bump for objects inserted there. > > I am not sure that existing implementation is complete, but at least in > some places it is protected by xpt_lock_buses(), which is wrapper for > mtx_lock(&xsoftc.xpt_topo_lock). camperiphfree() called under the lock, > same as many (all?) traverses. Initially I thought about using xpt_lock_buses() but then I regret in order to avoid any unconvenient LOR. Using a new lock would decrease the chances to see this happening. >> I don't think the lists are protected at all so I made this simple >> patch taking advantage by a global lock: >> http://www.freebsd.org/~attilio/Sandvine/pdrv/pdrv_lock.diff >> >> The patch is simple enough but I just test-compiled it (will need some >> time to run in a debugging kernel, hope to do tonight) and maybe you >> can already give your opinions here. > > It is not obvious to me, how your new lock expected to interoperate with > existing xpt_topo_lock. I have feeling that it duplicates one in some > places. If you believe that second lock is needed there, then probably > first one should be partially removed. But then we should be careful to > not create LORs between them, as they are not natively nested. > > Changes in cam_xpt.c break splbreaknum meaning of temporary dropping > xpt_topo_lock. I have doubts whether it is required now at all now, but > leaving dead code it definitely not good. If you think that using xpt_topo_lock in all the other places accessing units that don't do right now is suitable and safe I'm fine with it. Otherwise the new global lock should be fine I assume. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-scsi@FreeBSD.ORG Fri Mar 5 01:37:33 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 680EA106566C for ; Fri, 5 Mar 2010 01:37:33 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-iw0-f173.google.com (mail-iw0-f173.google.com [209.85.223.173]) by mx1.freebsd.org (Postfix) with ESMTP id 2C11C8FC1B for ; Fri, 5 Mar 2010 01:37:32 +0000 (UTC) Received: by iwn3 with SMTP id 3so2328848iwn.13 for ; Thu, 04 Mar 2010 17:37:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=ROu3c+F+IKmm/VquIxuH77JNImfCrUnrbEbt3hIpaiI=; b=jT/5CeCO/mxCF/Up+KGRViBkVqEoh8yL54243vf+8e4Amlv0j/YPztsvzXhTaXVdtp MFYrfkFMEYnd6n0ulW7RQSeB6F2kOlaWJj+jk085Qr75+fwK36M4EB86SyMelNSLX17w C7vZnpYLEff+SJ8G/CWepzIC/pv/GIJ9hy05c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=Wac+WImhDA6g6F3JgaLjInC+3WoEN8AsaUSv3wuLeNcOdf8h7kxz9epZ7BGmmxlx6I u3ZALpP1KXLoUi2Tt5WpsFbo2R6+B+hqHGRIn/jZQ+opkfNOjYu4J8yVm246wIgAE+cy KyZWqWSO/1qhS5oLkIxFafyOqF6WFIw3vhowk= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.231.160.205 with SMTP id o13mr1099604ibx.13.1267753043951; Thu, 04 Mar 2010 17:37:23 -0800 (PST) In-Reply-To: <4B901419.8060800@feral.com> References: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> <4B8EDAE8.3080401@feral.com> <3bbf2fe11003031357o518d6028m8157d9110a9122f3@mail.gmail.com> <4B8EF128.8050704@feral.com> <3bbf2fe11003031532u2207eb55h19c3a045215a7d84@mail.gmail.com> <4B8EF336.80107@feral.com> <3bbf2fe11003031547kd5f7314t3d83b2bde06c1c2f@mail.gmail.com> <4B8EF990.5030407@feral.com> <3bbf2fe11003031607wa3727b5ke89bc2a909d4d6a6@mail.gmail.com> <4B901419.8060800@feral.com> Date: Fri, 5 Mar 2010 02:37:23 +0100 X-Google-Sender-Auth: dc7ed325c18b956a Message-ID: <3bbf2fe11003041737p30690522ya81e1b8f4bd6bbf9@mail.gmail.com> From: Attilio Rao To: mj@feral.com Content-Type: text/plain; charset=UTF-8 Cc: freebsd-scsi@freebsd.org Subject: Re: How is supposed to be protected the units list? 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: Fri, 05 Mar 2010 01:37:33 -0000 2010/3/4 Matthew Jacob : > The referred to patch at least got me out of panic case :-).. > > > http://people.freebsd.org/~mjacob/scsi_da.c.patch Yes, honestly the main intent of this patch is to offer a stable ground for correct handling of periph. When looking about refcounting them correctly, the main problem is that there was no initial condition assuring safety, and the initial patch should address this, but I'm sure there are places where periph refcount is not handled correctly and this may be one. Thanks, Attilio PS: Sorry for late responses since now, but I'm mostly away. -- Peace can only be achieved by understanding - A. Einstein