From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: RAID-10 keeps aborting Date: Wed, 12 Jun 2013 07:29:12 -0700 Message-ID: <51B885B8.9040600@zytor.com> References: <51AC1440.7020505@zytor.com> <51AC3283.4000403@zytor.com> <51ACBAA0.40604@zytor.com> <51ACD511.4030604@zytor.com> <51AE2A8C.4080508@zytor.com> <51AE3441.3000208@zytor.com> <51AEA4FE.3060900@zytor.com> <20130606142747.1fc17b7f@jlaw-desktop.mno.stratus.com> <2 0130610101505.33b32d07@jlaw-desktop.mno.stratus.com> <20130612131543.1c79e077@notabene.brown> <51B7F41F.9000605@zytor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-raid-owner@vger.kernel.org To: "Martin K. Petersen" Cc: NeilBrown , Joe Lawrence , Dan Williams , linux-raid List-Id: linux-raid.ids On 06/12/2013 07:25 AM, Martin K. Petersen wrote: >>>>>> "hpa" == H Peter Anvin writes: > >>> If a drive has some quirky behaviour wrt WRITE SAME, then that should >>> be handled in some place where 'quirks' are handled - certainly not >>> in md. > > hpa> The problem here is that you don't find out ahead of time. > > hpa> Now, if I understand the issue at hand correctly is that the > hpa> reporting here was actually a Linux bug related to SATA drives > hpa> behind a SAS controller. Martin, am I right? > > Support for WRITE SAME is harder for us to detect. With discard we have > a set of device-reported bits we can use as triggers, not so for WRITE > SAME. And since it is a destructive command we can not simply issue one > at device discovery time to try whether it works. > > Technically there's nothing that prevents a SAS controller's SCSI-ATA > Translation to handle WRITE SAME. The patch I posted simply adds another > heuristic. Namely that if we can see that the drive behind the SAS > controller is of the ATA persuasion we will not attempt to issue WRITE > SAME unless the controller explicitly advertises WRITE SAME support > using REPORT SUPPORTED OPERATION CODES. > > Sadly we can not exclusively rely on RSOC when deciding whether WRITE > SAME is supported or not for devices in general. 95% of the WRITE > SAME-capable devices out there do not support RSOC :( > The second question is if we should disable WRITE SAME for raid1/10 (what about raid0?) for 3.10/stable or if your patch really is sufficient... "just adds another heuristic" makes me nervous. -hpa