[XSCE] sdcard for /opt and /library on xo 1.5
quozl at laptop.org
Wed Jul 15 02:01:24 EDT 2015
On Wed, Jul 15, 2015 at 12:47:10AM -0400, Samuel Greenfeld wrote:
> Would periodically erasing SD cards and eMMC storage help to extend
> their useful life?
No, I don't think so. Nor would it hurt their life. It is just a few
writes to metadata mapping tables kept in a different physical area of
the device. (The tables relate virtual block numbers used by the host
to physical pages used by the device.)
> Or is this potentially dangerous for chips known to be used which
> implement these instructions incorrectly?
Doesn't seem likely, but good point; there may exist a set of devices
that implement the command incorrectly.
Although the same could be said for other corner cases, like writing a
block in the last position of a page after the page has triggered the
read disturb rewrite handler.
Hopefully the test suites will have caught both scenarios.
> A few years ago, XO firmware would erase the SD card prior to
> running fs-update. But if I recall correctly this was disabled
> because it caused certain SD cards to hang.
If I recall correctly it was because certain SD cards would refuse the
command; they didn't really hang, they just gave an error.
While investigating we found that the erasure was only covering a tiny
part of the device block numbers (our mistake), so it wasn't being
We didn't want to increase the time taken to fs-update, so we removed
We also switched from linear to sparse input files.
> It might also be possible to enable the eMMC equivalent of TRIM in
> XO software builds provided XO eMMC's don't accidentally discard the
> wrong block.
Yes. TRIM is like ERASE except the device is not obligated to return
a block of zeros.
Both become a write to the mapping table.
Acting on the wrong block seems unlikely though.
A secure ERASE is different; in addition to a mapping table write they
also COPY the page less any unerased blocks and then do an erase page.
I guess writing zero to all blocks might not erase any page; it might
instead just write to the mapping table to map each block to a zero
More information about the Devel