From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH] libata: use FLUSH_EXT only when driver is larger than LBA28 limit Date: Sat, 11 Nov 2006 03:44:05 +0900 Message-ID: <4554C875.3000505@gmail.com> References: <20061110183304.GA22793@htj.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from ug-out-1314.google.com ([66.249.92.168]:29500 "EHLO ug-out-1314.google.com") by vger.kernel.org with ESMTP id S1946725AbWKJSoQ (ORCPT ); Fri, 10 Nov 2006 13:44:16 -0500 Received: by ug-out-1314.google.com with SMTP id m3so604273ugc for ; Fri, 10 Nov 2006 10:44:14 -0800 (PST) In-Reply-To: <20061110183304.GA22793@htj.dyndns.org> Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: Jeff Garzik Cc: linux-ide@vger.kernel.org, Danny Kukawka , Stefan Seyfried Tejun Heo wrote: > Many drives support LBA48 even when its capacity is smaller than > 1<<28, as LBA48 is required for many functionalities. FLUSH_EXT is > mandatory for drives w/ LBA48 support. > > Interestingly, at least one of such drives (ST960812A) has problems > dealing with FLUSH_EXT. It eventually completes the command but takes > around 7 seconds to finish in many cases thus drastically slowing down > IO transactions. This seems to be a firmware bug which sneaked into > production probably because no other ATA driver including linux IDE > issues FLUSH_EXT to drives which report support for LBA48 & FLUSH_EXT > but is smaller than 1<<28 blocks. > > This patch adds ATA_DFLAG_FLUSH_EXT which is set iff the drive > supports LBA48 & FLUSH_EXT and is larger than LBA28 limit. Both cache > flush paths are updated to issue FLUSH_EXT only when the flag is set. > Note that the changed behavior is more inline with the rest of libata. > libata prefers shorter commands whenever possible. Jeff, I think this should go into #uptream-fixes, too. We shouldn't have issued FLUSH_EXT to < 1<<28 devices in the first place. Thanks. -- tejun