From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Bottomley Subject: Re: Re: Re: BUG in kernel: Wrong Handling of USB =?UTF-8?Q?HDD=E2=80=99s?= in scsiglue(slave_configure) and scsi/sd(sd_read_cache_type) Date: Wed, 05 Oct 2011 10:24:02 -0700 Message-ID: <1317835442.7238.8.camel@dabdike> References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Alan Stern , Douglas Gilbert , linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig To: Amit Sahrawat Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Wed, 2011-10-05 at 22:29 +0530, Amit Sahrawat wrote: > Can anyone suggest what is the way ahead to detect the presence of > Write Cache in these kind of USB HDD and proceed accordingly by > assigning proper flushing method. > Please share some opinions on this. We're a bit out of ideas. We've already established that we do exactly what windows does in this situation, which is usually what we aim for. Realistically, if the disks lie how do we know when not to believe them? The best we could probably offer is an interface to turn on the WCE bit in software (technically, you can do this today in /scsi/class/scsi_disk//cache_type, it's just that it will try to commit the change as a MODE_SELECT which will presumably fail). James