Re: Flash erase groups and filesystems
From: Jörn Engel
Date: Tue Aug 16 2005 - 11:28:16 EST
On Mon, 15 August 2005 22:21:55 +0200, Pierre Ossman wrote:
>
> 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.
Question came up before, albeit with a different phrasing. One
possible approach to benefit from this ability would be to create a
"forget" operation. When a filesystem already knows that some data is
unneeded (after a truncate or erase operation), it will ask the device
to forget previously occupied blocks.
The device then has the _option_ of handling the forget operation.
Further reads on these blocks may return random data.
And since noone stepped up to implement this yet, you can still get
all the fame and glory yourself! ;)
Jörn
--
All art is but imitation of nature.
-- Lucius Annaeus Seneca
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/