From owner-freebsd-scsi@FreeBSD.ORG Mon Jul 30 10:30:13 2012 Return-Path: Delivered-To: freebsd-scsi@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 263FB1065686 for ; Mon, 30 Jul 2012 10:30:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 088408FC1C for ; Mon, 30 Jul 2012 10:30:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q6UAUCaW096492 for ; Mon, 30 Jul 2012 10:30:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q6UAUCKW096489; Mon, 30 Jul 2012 10:30:12 GMT (envelope-from gnats) Date: Mon, 30 Jul 2012 10:30:12 GMT Message-Id: <201207301030.q6UAUCKW096489@freefall.freebsd.org> To: freebsd-scsi@FreeBSD.org From: "Steven Hartland" Cc: Subject: Re: kern/169974: Patch to add Quirks for SSD that are 4k optimised X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Steven Hartland List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2012 10:30:13 -0000 The following reply was made to PR kern/169974; it has been noted by GNATS. From: "Steven Hartland" To: , Cc: Subject: Re: kern/169974: Patch to add Quirks for SSD that are 4k optimised Date: Mon, 30 Jul 2012 11:18:45 +0100 This is a multi-part message in MIME format. ------=_NextPart_000_054F_01CD6E45.157ACAA0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit Updated patch adding HyperX 3k, another set of sandforce based disks by Kingston. Regards Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. ------=_NextPart_000_054F_01CD6E45.157ACAA0 Content-Type: text/plain; format=flowed; name="ssd_quirks.txt"; reply-type=original Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ssd_quirks.txt" Adds 4K quirks for the following SSD's which all perform better when 4K = aligned=0A= and only except 4K deletes (TRIM):-=0A= * Corsair Force 2 & Force 3=0A= * OCZ Agility 3=0A= * OCZ Vertex 2 & Vertex 3=0A= * SuperTalent TeraDrive CT=0A= * Crucial RealSSD C300=0A= * XceedIOPS SATA=0A= * Intel 330 Series=0A= * OCZ Deneva R Series=0A= * Kingston HyperX 3k=0A= --- sys/cam/ata/ata_da.c.orig 2012-07-18 12:11:26.036266229 +0000=0A= +++ sys/cam/ata/ata_da.c 2012-07-30 10:02:43.445141719 +0000=0A= @@ -268,6 +268,94 @@=0A= /*quirks*/ADA_Q_4K=0A= },=0A= {=0A= + /*=0A= + * Corsair Force 2 SSDs=0A= + * 4k optimised & trim only works in 4k requests + 4k aligned=0A= + */=0A= + { T_DIRECT, SIP_MEDIA_FIXED, "*", "Corsair CSSD-F*", "*" },=0A= + /*quirks*/ADA_Q_4K=0A= + },=0A= + {=0A= + /*=0A= + * Corsair Force 3 SSDs=0A= + * 4k optimised & trim only works in 4k requests + 4k aligned=0A= + */=0A= + { T_DIRECT, SIP_MEDIA_FIXED, "*", "Corsair Force 3*", "*" },=0A= + /*quirks*/ADA_Q_4K=0A= + },=0A= + {=0A= + /*=0A= + * OCZ Agility 3 SSDs=0A= + * 4k optimised & trim only works in 4k requests + 4k aligned=0A= + */=0A= + { T_DIRECT, SIP_MEDIA_FIXED, "*", "OCZ-AGILITY3*", "*" },=0A= + /*quirks*/ADA_Q_4K=0A= + },=0A= + {=0A= + /*=0A= + * OCZ Vertex 2 SSDs (inc pro series)=0A= + * 4k optimised & trim only works in 4k requests + 4k aligned=0A= + */=0A= + { T_DIRECT, SIP_MEDIA_FIXED, "*", "OCZ?VERTEX2*", "*" },=0A= + /*quirks*/ADA_Q_4K=0A= + },=0A= + {=0A= + /*=0A= + * OCZ Vertex 3 SSDs=0A= + * 4k optimised & trim only works in 4k requests + 4k aligned=0A= + */=0A= + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "OCZ-VERTEX3*", "*" },=0A= + /*quirks*/ADA_Q_4K=0A= + },=0A= + {=0A= + /*=0A= + * SuperTalent TeraDrive CT SSDs=0A= + * 4k optimised & trim only works in 4k requests + 4k aligned=0A= + */=0A= + { T_DIRECT, SIP_MEDIA_FIXED, "*", "FTM??CT25H*", "*" },=0A= + /*quirks*/ADA_Q_4K=0A= + },=0A= + {=0A= + /*=0A= + * Crucial RealSSD C300 SSDs=0A= + * 4k optimised=0A= + */=0A= + { T_DIRECT, SIP_MEDIA_FIXED, "*", "C300-CTFDDAC???MAG*",=0A= + "*" }, /*quirks*/ADA_Q_4K=0A= + },=0A= + {=0A= + /*=0A= + * XceedIOPS SATA SSDs=0A= + * 4k optimised=0A= + */=0A= + { T_DIRECT, SIP_MEDIA_FIXED, "*", "SG9XCS2D*", "*" },=0A= + /*quirks*/ADA_Q_4K=0A= + },=0A= + {=0A= + /*=0A= + * Intel 330 Series SSDs=0A= + * 4k optimised & trim only works in 4k requests + 4k aligned=0A= + */=0A= + { T_DIRECT, SIP_MEDIA_FIXED, "*", "INTEL SSDSC2ct*", "*" },=0A= + /*quirks*/ADA_Q_4K=0A= + },=0A= + {=0A= + /*=0A= + * OCZ Deneva R Series SSDs=0A= + * 4k optimised & trim only works in 4k requests + 4k aligned=0A= + */=0A= + { T_DIRECT, SIP_MEDIA_FIXED, "*", "DENRSTE251M45*", "*" },=0A= + /*quirks*/ADA_Q_4K=0A= + },=0A= + {=0A= + /*=0A= + * Kingston HyperX 3k SSDs=0A= + * 4k optimised & trim only works in 4k requests + 4k aligned=0A= + */=0A= + { T_DIRECT, SIP_MEDIA_FIXED, "*", "KINGSTON SH103S3*", "*" },=0A= + /*quirks*/ADA_Q_4K=0A= + },=0A= + {=0A= /* Default */=0A= {=0A= T_ANY, SIP_MEDIA_REMOVABLE|SIP_MEDIA_FIXED,=0A= --- sys/cam/scsi/scsi_da.c.orig 2012-07-30 10:05:12.801568145 +0000=0A= +++ sys/cam/scsi/scsi_da.c 2012-07-30 10:02:00.416761382 +0000=0A= @@ -846,6 +846,94 @@=0A= /* WDC Scorpio Blue Advanced Format (4k) drives */=0A= { T_DIRECT, SIP_MEDIA_FIXED, "WDC WD??", "???PVT*", "*" },=0A= /*quirks*/DA_Q_4K=0A= + },=0A= + {=0A= + /*=0A= + * Corsair Force 2 SSDs=0A= + * 4k optimised & trim only works in 4k requests + 4k aligned=0A= + */=0A= + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "Corsair CSSD-F*", "*" },=0A= + /*quirks*/DA_Q_4K=0A= + },=0A= + {=0A= + /*=0A= + * Corsair Force 3 SSDs=0A= + * 4k optimised & trim only works in 4k requests + 4k aligned=0A= + */=0A= + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "Corsair Force 3*", "*" },=0A= + /*quirks*/DA_Q_4K=0A= + },=0A= + {=0A= + /*=0A= + * OCZ Agility 3 SSDs=0A= + * 4k optimised & trim only works in 4k requests + 4k aligned=0A= + */=0A= + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "OCZ-AGILITY3*", "*" },=0A= + /*quirks*/DA_Q_4K=0A= + },=0A= + {=0A= + /*=0A= + * OCZ Vertex 2 SSDs (inc pro series)=0A= + * 4k optimised & trim only works in 4k requests + 4k aligned=0A= + */=0A= + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "OCZ?VERTEX2*", "*" },=0A= + /*quirks*/DA_Q_4K=0A= + },=0A= + {=0A= + /*=0A= + * OCZ Vertex 3 SSDs=0A= + * 4k optimised & trim only works in 4k requests + 4k aligned=0A= + */=0A= + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "OCZ-VERTEX3*", "*" },=0A= + /*quirks*/DA_Q_4K=0A= + },=0A= + {=0A= + /*=0A= + * SuperTalent TeraDrive CT SSDs=0A= + * 4k optimised & trim only works in 4k requests + 4k aligned=0A= + */=0A= + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "FTM??CT25H*", "*" },=0A= + /*quirks*/DA_Q_4K=0A= + },=0A= + {=0A= + /*=0A= + * Crucial RealSSD C300 SSDs=0A= + * 4k optimised=0A= + */=0A= + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "C300-CTFDDAC???MAG*",=0A= + "*" }, /*quirks*/DA_Q_4K=0A= + },=0A= + {=0A= + /*=0A= + * XceedIOPS SATA SSDs=0A= + * 4k optimised=0A= + */=0A= + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "SG9XCS2D*", "*" },=0A= + /*quirks*/DA_Q_4K=0A= + },=0A= + {=0A= + /*=0A= + * Intel 330 Series SSDs=0A= + * 4k optimised & trim only works in 4k requests + 4k aligned=0A= + */=0A= + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "INTEL SSDSC2ct*", "*" },=0A= + /*quirks*/DA_Q_4K=0A= + },=0A= + {=0A= + /*=0A= + * OCZ Deneva R Series SSDs=0A= + * 4k optimised & trim only works in 4k requests + 4k aligned=0A= + */=0A= + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "DENRSTE251M45*", "*" },=0A= + /*quirks*/DA_Q_4K=0A= + },=0A= + {=0A= + /*=0A= + * Kingston HyperX 3k SSDs=0A= + * 4k optimised & trim only works in 4k requests + 4k aligned=0A= + */=0A= + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "KINGSTON SH103S3*", "*" },=0A= + /*quirks*/DA_Q_4K=0A= }=0A= };=0A= =0A= ------=_NextPart_000_054F_01CD6E45.157ACAA0-- From owner-freebsd-scsi@FreeBSD.ORG Mon Jul 30 11:07:25 2012 Return-Path: Delivered-To: freebsd-scsi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A6712106567B for ; Mon, 30 Jul 2012 11:07:25 +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 8E9128FC23 for ; Mon, 30 Jul 2012 11:07:25 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q6UB7P9h001919 for ; Mon, 30 Jul 2012 11:07:25 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q6UB7Oe6001917 for freebsd-scsi@FreeBSD.org; Mon, 30 Jul 2012 11:07:24 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 30 Jul 2012 11:07:24 GMT Message-Id: <201207301107.q6UB7Oe6001917@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, 30 Jul 2012 11:07:25 -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/169976 scsi [cam] [patch] make scsi_da use sysctl values where app o kern/169974 scsi [cam] [patch] add Quirks for SSD that are 4k optimised o kern/169835 scsi [patch] remove some unused variables from scsi_da prob o kern/169801 scsi [cam] [patc] make changes to delete_method in scsi_da o kern/169403 scsi [cam] [patch] CAM layer, I/O starvation, no fairness o kern/165982 scsi [mpt] mpt instability, drive resets, and losses on Fre o kern/165740 scsi [cam] SCSI code must drain callbacks before free o kern/163713 scsi [aic7xxx] [patch] Add Adaptec29329LPE to aic79xx_pci.c o kern/162256 scsi [mpt] QUEUE FULL EVENT and 'mpt_cam_event: 0x0' o kern/161809 scsi [cam] [patch] set kern.cam.boot_delay via build option o kern/159412 scsi [ciss] 7.3 RELEASE: ciss0 ADAPTER HEARTBEAT FAILED err o kern/157770 scsi [iscsi] [panic] iscsi_initiator panic o kern/154432 scsi [xpt] run_interrupt_driven_hooks: still waiting after o kern/153514 scsi [cam] [panic] CAM related panic o kern/153361 scsi [ciss] Smart Array 5300 boot/detect drive problem o kern/152250 scsi [ciss] [patch] Kernel panic when hw.ciss.expose_hidden o kern/151564 scsi [ciss] ciss(4) should increase CISS_MAX_LOGICAL to 10 o docs/151336 scsi Missing documentation of scsi_ and ata_ functions in c s kern/149927 scsi [cam] hard drive not stopped before removing power dur o kern/148083 scsi [aac] Strange device reporting o kern/147704 scsi [mpt] sys/dev/mpt: new chip revision, partially unsupp o kern/146287 scsi [ciss] ciss(4) cannot see more than one SmartArray con o kern/145768 scsi [mpt] can't perform I/O on SAS based SAN disk in freeb o kern/144648 scsi [aac] Strange values of speed and bus width in dmesg o kern/144301 scsi [ciss] [hang] HP proliant server locks when using ciss o kern/142351 scsi [mpt] LSILogic driver performance problems 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 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/127717 scsi [ata] [patch] [request] - support write cache toggling o kern/123674 scsi [ahc] ahc driver dumping o kern/123520 scsi [ahd] unable to boot from net while using ahd 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/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/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/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 55 problems total. From owner-freebsd-scsi@FreeBSD.ORG Mon Jul 30 21:16:48 2012 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 821) id 591ED106566B; Mon, 30 Jul 2012 21:16:48 +0000 (UTC) Date: Mon, 30 Jul 2012 21:16:48 +0000 From: John To: Matyee Message-ID: <20120730211648.GA73061@FreeBSD.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: freebsd-scsi@freebsd.org Subject: Re: Multipath iSCSI 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, 30 Jul 2012 21:16:48 -0000 ----- P??ter Szab??'s Original Message ----- > Dear *, > > I have started to build a HA system. It runs a postgresql cluster with > two nodes (master and hot stand-by, FreeBSD 9.0, postgresl 9.1). The > storage for the database is provided by 2 separate systems (FreeBSD > 9.0, iSCSI target, over ZFS). For the maximum redundancy I would like > to use multipathing on the DB nodes. For me the best would be if the 2 > DB nodes and the 2 storage nodes are all FreeBSD. > > Now I have 4 installed FreeBSD 9.0, iSCSI targets are in place, and > the database nodes uses the exported targets as a storage. What is > left is the multipath part. > > I have search a lot in this topic, but now I am really confused. I > found some mails from this mailing list, the problem was the same, and > there was no solution, but the mails are quite old (FreeBSD 7.3). I > checked gmultipath, but it seems it is not the solution. > > Does FreeBSD support iSCSI multipath currently, or should I change the > OS under the database nodes from FreeBSD to some linux distribution. I > found a lot of working configuration for linux and iSCSI multipathing. Hi, This may not be the answer you're looking for. iscontrol TargetName=disk1_net1 TargetAddress=... iscontrol TargetName=disk1_ne12 TargetAddress=... You now have access to the same lun via two different paths. Now create a gmultipath entity (if the above came in as da1 & 2): gmultipath label -Av MULTIPATH /dev/da1 /dev/da2 The above should create: /dev/multipath/MULTIPATH which should provide the characteristics you're looking for. The -A option creates the device in active/active mode. Good Luck, John > Cheers, > > Matyee From owner-freebsd-scsi@FreeBSD.ORG Fri Aug 3 11:18:57 2012 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 751D5106564A for ; Fri, 3 Aug 2012 11:18:57 +0000 (UTC) (envelope-from aturetta@commit.it) Received: from mr002msb.fastweb.it (mr002msb.fastweb.it [85.18.95.86]) by mx1.freebsd.org (Postfix) with ESMTP id F27A98FC14 for ; Fri, 3 Aug 2012 11:18:56 +0000 (UTC) Received: from mail.commit.it (89.97.230.186) by mr002msb.fastweb.it (8.5.140.03) id 5016C00B004B4E91 for freebsd-scsi@freebsd.org; Fri, 3 Aug 2012 13:15:56 +0200 Received: from [192.168.29.246] (2-229-104-166.ip196.fastwebnet.it [2.229.104.166]) (authenticated bits=0) by mail.commit.it (8.14.5/8.14.5) with ESMTP id q73CDoVr056553 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 3 Aug 2012 14:13:51 +0200 (CEST) (envelope-from aturetta@commit.it) Message-ID: <501BB2E5.8090109@commit.it> Date: Fri, 03 Aug 2012 13:15:49 +0200 From: Angelo Turetta User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: freebsd-scsi@freebsd.org References: <20120730211648.GA73061@FreeBSD.org> In-Reply-To: <20120730211648.GA73061@FreeBSD.org> X-Enigmail-Version: 1.4.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Cc: Subject: Re: Multipath iSCSI 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, 03 Aug 2012 11:18:57 -0000 On 30/07/2012 23:16, John wrote: > > iscontrol TargetName=disk1_net1 TargetAddress=... iscontrol > TargetName=disk1_ne12 TargetAddress=... > > You now have access to the same lun via two different paths. > > Now create a gmultipath entity (if the above came in as da1 & 2): > > gmultipath label -Av MULTIPATH /dev/da1 /dev/da2 > > The above should create: > > /dev/multipath/MULTIPATH > > which should provide the characteristics you're looking for. The > -A option creates the device in active/active mode. That would work if iscsi_initiator tolerated iscsi failures. Unluckily it doesn't: and if a path fails, the related iscontrol process becomes unkillable, even blocking reboot. Only way out is a hard reset or power off. Almost useless, at lease with storage with active/passive controllers, eg PowerVault MD3000i. Péter, try how it works in your case. If you share my same fate, I'd buy an iScsi HBA. They are not that expensive. Angelo Turetta From owner-freebsd-scsi@FreeBSD.ORG Fri Aug 3 14:20:12 2012 Return-Path: Delivered-To: freebsd-scsi@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C563D1065672 for ; Fri, 3 Aug 2012 14:20:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id AE5938FC08 for ; Fri, 3 Aug 2012 14:20:12 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q73EKCJY075273 for ; Fri, 3 Aug 2012 14:20:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q73EKCr5075272; Fri, 3 Aug 2012 14:20:12 GMT (envelope-from gnats) Date: Fri, 3 Aug 2012 14:20:12 GMT Message-Id: <201208031420.q73EKCr5075272@freefall.freebsd.org> To: freebsd-scsi@FreeBSD.org From: "Steven Hartland" Cc: Subject: Re: kern/169801: [cam] [patc] make changes to delete_method in scsi_da consistent X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Steven Hartland List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Aug 2012 14:20:12 -0000 The following reply was made to PR kern/169801; it has been noted by GNATS. From: "Steven Hartland" To: Cc: Subject: Re: kern/169801: [cam] [patc] make changes to delete_method in scsi_da consistent Date: Fri, 3 Aug 2012 15:11:52 +0100 This is a multi-part message in MIME format. ------=_NextPart_000_0589_01CD718A.4FE9A470 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit Updated patch correcting var order in dadeletemethodsysctl as per feedback from Alexander Motin. ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. ------=_NextPart_000_0589_01CD718A.4FE9A470 Content-Type: text/plain; format=flowed; name="scsi_da_deleteset.txt"; reply-type=original Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="scsi_da_deleteset.txt" Updates delete_method sysctl changes to always maintain disk d_flags=0A= DISKFLAG_CANDELETE. While this change makes this layer consistent=0A= other layers such as UFS and ZFS BIO_DELETE support may not notice=0A= any change made manually via these device sysctls until the device=0A= is reopened via a mount.=0A= =0A= Also corrected var order in dadeletemethodsysctl=0A= --- sys/cam/scsi/scsi_da.c.orig 2012-08-03 08:48:12.519680130 +0000=0A= +++ sys/cam/scsi/scsi_da.c 2012-08-03 09:02:21.994117013 +0000=0A= @@ -897,6 +897,8 @@=0A= static void dasysctlinit(void *context, int pending);=0A= static int dacmdsizesysctl(SYSCTL_HANDLER_ARGS);=0A= static int dadeletemethodsysctl(SYSCTL_HANDLER_ARGS);=0A= +static int dadeletemethodset(struct da_softc *softc,=0A= + da_delete_methods delete_method);=0A= static periph_ctor_t daregister;=0A= static periph_dtor_t dacleanup;=0A= static periph_start_t dastart;=0A= @@ -1462,7 +1464,7 @@=0A= */=0A= SYSCTL_ADD_PROC(&softc->sysctl_ctx,SYSCTL_CHILDREN(softc->sysctl_tree),=0A= OID_AUTO, "delete_method", CTLTYPE_STRING | CTLFLAG_RW,=0A= - &softc->delete_method, 0, dadeletemethodsysctl, "A",=0A= + softc, 0, dadeletemethodsysctl, "A",=0A= "BIO_DELETE execution method");=0A= SYSCTL_ADD_PROC(&softc->sysctl_ctx, = SYSCTL_CHILDREN(softc->sysctl_tree),=0A= OID_AUTO, "minimum_cmd_size", CTLTYPE_INT | CTLFLAG_RW,=0A= @@ -1505,14 +1507,32 @@=0A= }=0A= =0A= static int=0A= +dadeletemethodset(struct da_softc *softc, da_delete_methods = delete_method)=0A= +{=0A= + if (0 > delete_method || DA_DELETE_MAX < delete_method)=0A= + return (EINVAL);=0A= +=0A= + softc->delete_method =3D delete_method;=0A= +=0A= + if (softc->delete_method > DA_DELETE_DISABLE)=0A= + softc->disk->d_flags |=3D DISKFLAG_CANDELETE;=0A= + else=0A= + softc->disk->d_flags &=3D ~DISKFLAG_CANDELETE;=0A= +=0A= + return (0);=0A= +}=0A= +=0A= +static int=0A= dadeletemethodsysctl(SYSCTL_HANDLER_ARGS)=0A= {=0A= char buf[16];=0A= - int error;=0A= const char *p;=0A= - int i, value;=0A= + struct da_softc *softc;=0A= + int i, error, value;=0A= =0A= - value =3D *(int *)arg1;=0A= + softc =3D (struct da_softc *)arg1;=0A= +=0A= + value =3D softc->delete_method;=0A= if (value < 0 || value > DA_DELETE_MAX)=0A= p =3D "UNKNOWN";=0A= else=0A= @@ -1524,8 +1544,7 @@=0A= for (i =3D 0; i <=3D DA_DELETE_MAX; i++) {=0A= if (strcmp(buf, da_delete_method_names[i]) !=3D 0)=0A= continue;=0A= - *(int *)arg1 =3D i;=0A= - return (0);=0A= + return dadeletemethodset(softc, i);=0A= }=0A= return (EINVAL);=0A= }=0A= @@ -1968,24 +1987,24 @@=0A= if (softc->delete_method =3D=3D DA_DELETE_UNMAP) {=0A= xpt_print(ccb->ccb_h.path, "UNMAP is not supported, "=0A= "switching to WRITE SAME(16) with UNMAP.\n");=0A= - softc->delete_method =3D DA_DELETE_WS16;=0A= + dadeletemethodset(softc, DA_DELETE_WS16);=0A= } else if (softc->delete_method =3D=3D DA_DELETE_WS16) {=0A= xpt_print(ccb->ccb_h.path,=0A= "WRITE SAME(16) with UNMAP is not supported, "=0A= "disabling BIO_DELETE.\n");=0A= - softc->delete_method =3D DA_DELETE_DISABLE;=0A= + dadeletemethodset(softc, DA_DELETE_DISABLE);=0A= } else if (softc->delete_method =3D=3D DA_DELETE_WS10) {=0A= xpt_print(ccb->ccb_h.path,=0A= "WRITE SAME(10) with UNMAP is not supported, "=0A= "disabling BIO_DELETE.\n");=0A= - softc->delete_method =3D DA_DELETE_DISABLE;=0A= + dadeletemethodset(softc, DA_DELETE_DISABLE);=0A= } else if (softc->delete_method =3D=3D DA_DELETE_ZERO) {=0A= xpt_print(ccb->ccb_h.path,=0A= "WRITE SAME(10) is not supported, "=0A= "disabling BIO_DELETE.\n");=0A= - softc->delete_method =3D DA_DELETE_DISABLE;=0A= + dadeletemethodset(softc, DA_DELETE_DISABLE);=0A= } else=0A= - softc->delete_method =3D DA_DELETE_DISABLE;=0A= + dadeletemethodset(softc, DA_DELETE_DISABLE);=0A= while ((bp =3D bioq_takefirst(&softc->delete_run_queue))=0A= !=3D NULL)=0A= bioq_disksort(&softc->delete_queue, bp);=0A= @@ -2213,7 +2232,7 @@=0A= lbppbe, lalba & SRC16_LALBA);=0A= if ((lalba & SRC16_LBPME) &&=0A= softc->delete_method =3D=3D DA_DELETE_NONE)=0A= - softc->delete_method =3D DA_DELETE_UNMAP;=0A= + dadeletemethodset(softc, DA_DELETE_UNMAP);=0A= dp =3D &softc->params;=0A= snprintf(announce_buf, sizeof(announce_buf),=0A= "%juMB (%ju %u byte sectors: %dH %dS/T "=0A= @@ -2626,7 +2645,7 @@=0A= lbppbe, lalba & SRC16_LALBA);=0A= if ((lalba & SRC16_LBPME) &&=0A= softc->delete_method =3D=3D DA_DELETE_NONE)=0A= - softc->delete_method =3D DA_DELETE_UNMAP;=0A= + dadeletemethodset(softc, DA_DELETE_UNMAP);=0A= }=0A= }=0A= =0A= ------=_NextPart_000_0589_01CD718A.4FE9A470-- From owner-freebsd-scsi@FreeBSD.ORG Fri Aug 3 17:37:53 2012 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 38F38106564A for ; Fri, 3 Aug 2012 17:37:53 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout2-b.corp.bf1.yahoo.com (mrout2-b.corp.bf1.yahoo.com [98.139.253.105]) by mx1.freebsd.org (Postfix) with ESMTP id D6EFB8FC0C for ; Fri, 3 Aug 2012 17:37:52 +0000 (UTC) Received: from [IPv6:::1] (proxy7.corp.yahoo.com [216.145.48.98]) by mrout2-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id q73HbOeY049779; Fri, 3 Aug 2012 10:37:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1344015446; bh=ZU3/VlCmr7CM9Wf6R6myjV7xaYQPmOiDJtTpO0sJ0EE=; h=Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date: Message-ID:Mime-Version:Content-Transfer-Encoding; b=ONc/xU/jsIJKKQNFDlclmFhqzJ8kTBnZAc28na1U+Z2jEjUpGzz/m05vpN/h0mLJ8 qDsFLEO7E0erX6J4ZRvSUGNSDal+oqt9dHg8YQ6wVuLgfgSI2vpKqtHEI8K05n5uOP FacB2+zRixyq8bdo01/mJn3ysgDyv2XaWpW9LIs0= From: Sean Bruno To: Doug Ambrisko In-Reply-To: <201203302225.q2UMPOrF055705@ambrisko.com> References: <201203302225.q2UMPOrF055705@ambrisko.com> Content-Type: text/plain; charset="UTF-8" Date: Fri, 03 Aug 2012 10:37:24 -0700 Message-ID: <1344015444.4472.0.camel@powernoodle.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Milter-Version: master.31+4-gbc07cd5+ X-CLX-ID: 015445000 Cc: "freebsd-scsi@freebsd.org" Subject: Re: Missing bio_resid on error case in mfi_disk_complete() 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, 03 Aug 2012 17:37:53 -0000 On Fri, 2012-03-30 at 15:25 -0700, Doug Ambrisko wrote: > Andrew Boyer writes: > | Hello Doug, > | We noticed that the AIO system doesn't react to I/O failures that > | come from mfi disks; the commands appear to complete. The upper > | layers are expecting bio->bio_resid to be non-zero if the bio failed. > | The patch below matches what scsi_da.c does in this case and also what > | mfi itself does in mfi_disk_strategy() if the I/O is invalid. > | > | Does this make sense? I meant to get this email sent before you > | started on the big merge. > | > | Thanks, > | Andrew > | > | Index: sys/dev/mfi/mfi_disk.c > | =================================================================== > | --- sys/dev/mfi/mfi_disk.c (revision 233707) > | +++ sys/dev/mfi/mfi_disk.c (working copy) > | @@ -274,6 +274,7 @@ > | hdr = bio->bio_driver1; > | > | if (bio->bio_flags & BIO_ERROR) { > | + bio->bio_resid = bio->bio_bcount; > | if (bio->bio_error == 0) > | bio->bio_error = EIO; > | disk_err(bio, "hard error", -1, 1); > > Looks good to me. I can check it in after I finish the merge. > The driver is compile tested now. So I'm about to check that in. > > Thanks, > > Doug A. > _______________________________________________ Cleaning up some emails. This was committed at svn r238371 Sean