[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B954BF5.2050506@zytor.com>
Date: Mon, 08 Mar 2010 11:11:49 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: James Bottomley <James.Bottomley@...e.de>
CC: "Martin K. Petersen" <martin.petersen@...cle.com>,
Tejun Heo <tj@...nel.org>,
"linux-ide@...r.kernel.org" <linux-ide@...r.kernel.org>,
lkml <linux-kernel@...r.kernel.org>,
Daniel Taylor <Daniel.Taylor@....com>,
Jeff Garzik <jeff@...zik.org>, Mark Lord <kernel@...savvy.com>,
tytso@....edu, hirofumi@...l.parknet.co.jp,
Andrew Morton <akpm@...ux-foundation.org>,
Alan Cox <alan@...rguk.ukuu.org.uk>, irtiger@...il.com,
Matthew Wilcox <matthew@....cx>, aschnell@...e.de,
knikanth@...e.de, jdelvare@...e.de
Subject: Re: ATA 4 KiB sector issues.
On 03/08/2010 10:58 AM, James Bottomley wrote:
>>
>> On the flipside, though, there really is very little net benefit to 4K
>> as opposed to 512 byte logical sectors: the additional protocol overhead
>> is relatively minimal, and as long as writes are aligned full blocks,
>> there shouldn't be any additional overhead on either the OS or the drive
>> side. On the plus side, you get full compatibility with the existing
>> software stack. The equation really seems rather simple.
>
> There's another problem that afflicts 4k drives emulating 512b: they
> have to do a read modify write for any isolated 512b write ... that
> leads to potential corruption of adjacent 512b blocks if power is lost
> at the moment the write is being done. Since most Linux filesystems are
> 4k sectors, misalignment really hammers this, plus most journal writes
> seem to be done in 512 byte increments. I suppose for USB this could be
> regarded as flakey as usual, though.
>
Misalignment sucks in general. This is nothing new - the RAID and flash
people have had these problems for a long time now. It's clear we need
to align our filesystems, period.
As to the read-modify-write issue: to some degree there is very little
you can do about it other than a big enough capacitor. If you can't
write a sector atomically and have it stick, you're screwed no matter what.
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists