public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Flash erase groups and filesystems
@ 2005-08-15 20:21 Pierre Ossman
  2005-08-16 16:27 ` Jörn Engel
  0 siblings, 1 reply; 9+ messages in thread
From: Pierre Ossman @ 2005-08-15 20:21 UTC (permalink / raw)
  To: LKML

If you know how flash erase groups behave then skip a bit ;)

As you may or may not be aware, flash memory tends to be designed so
that only large groups of sectors can be erased at a time. For most
systems this is handled automatically by having the onboard controller
caching everyhing but the sector being overwritten. If you write a
single sector at a time (or if the controller is stupid) this will
result in the flash being erased several times because of writes in
sectors close by. The end result being that your flash is worn out faster.

--8<--- skip to here ----

To minimise the number of erases the MMC protocol supports pre-erasing
blocks before you actually write to them. Now what I'm unclear on is how
this will interact with filesystems and the assumptions they make.

If the controller gets a request to write 128 sectors and this fails
after 20 sectors, the remaining 108 sectors will still have lost their
data because of the pre-erase. Will this break assumptions made in the
VFS layer? I.e. does it assume that only the failed sector has unknown data?

I'm writing a patch that gives this functionality to the MMC layer and
since I'm no VFS expert I need some input into any side effects.

Rgds
Pierre

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-08-18 11:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-15 20:21 Flash erase groups and filesystems Pierre Ossman
2005-08-16 16:27 ` Jörn Engel
2005-08-16 17:09   ` Pierre Ossman
2005-08-16 18:13     ` Jörn Engel
2005-08-16 18:52       ` Jörn Engel
2005-08-17 11:35         ` Pierre Ossman
2005-08-17 11:45           ` Jörn Engel
2005-08-17 14:35     ` Pavel Machek
2005-08-18 11:09       ` linux-os (Dick Johnson)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox