Re: RAID-10 keeps aborting
From: "H. Peter Anvin" <hpa@zytor.com>
Date: 2013-06-12 14:29:12
On 06/12/2013 07:25 AM, Martin K. Petersen wrote:
quoted
quoted
quoted
quoted
quoted
"hpa" == H Peter Anvin [off-list ref] writes:quoted
quoted
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