From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin K. Petersen" Subject: Re: ATA 4 KiB sector issues. Date: Mon, 08 Mar 2010 16:07:14 -0500 Message-ID: References: <4B947393.2050002@kernel.org> <1268031640.4389.11.camel@mulgrave.site> <4B9546E6.6050006@zytor.com> <1268074705.10660.23.camel@mulgrave.site> <20100308200206.dac60db7.ctpm@ist.utl.pt> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from rcsinet11.oracle.com ([148.87.113.123]:59665 "EHLO rcsinet11.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755410Ab0CHVJP convert rfc822-to-8bit (ORCPT ); Mon, 8 Mar 2010 16:09:15 -0500 In-Reply-To: <20100308200206.dac60db7.ctpm@ist.utl.pt> (=?utf-8?Q?=22Cl?= =?utf-8?Q?=C3=A1udio?= Martins"'s message of "Mon, 8 Mar 2010 20:02:06 +0000") Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: =?utf-8?Q?Cl=C3=A1udio?= Martins Cc: James Bottomley , "H. Peter Anvin" , "Martin K. Petersen" , Tejun Heo , "linux-ide@vger.kernel.org" , lkml , Daniel Taylor , Jeff Garzik , Mark Lord , tytso@mit.edu, hirofumi@mail.parknet.co.jp, Andrew Morton , Alan Cox , irtiger@gmail.com, Matthew Wilcox , aschnell@suse.de, knikanth@suse.de, jdelvare@suse.de >>>>> "Cl=C3=A1udio" =3D=3D Cl=C3=A1udio Martins writ= es: Cl=C3=A1udio> So the question is: what are hard drive makers guaranteei= ng (if Cl=C3=A1udio> anything at all)? No guarantees. Nothing that you can get in writing, anyway. Cl=C3=A1udio> Was a 512B sector write really atomic? Sometimes. Cl=C3=A1udio> Is a 4k one? =20 Sometimes, maybe. The problem with 4KB physical blocks is that if you do a partial or misaligned write you'll end up having to do read-modify-write. And tha= t introduces are scenario where a subsequent write error will affect logical blocks that were not part of the I/O request. However, you also have that with regular drives because they often writ= e more than the actual block undergoing I/O. For instance to reduce hotspot bleed to adjacent sectors. There have been several unsuccessful attempts at nudging the drive vendors into giving us real guarantees (supercapacitors, NVRAM or flash-backed write cache). No luck so far. So people that care use arrays with non-volatile caches. --=20 Martin K. Petersen Oracle Linux Engineering