Re: [RFC][PATCH] mmc: add an ioctl for erasing

From: Christoph Hellwig
Date: Fri May 21 2010 - 10:07:25 EST

On Fri, May 21, 2010 at 04:47:40PM +0300, Adrian Hunter wrote:
>> From f3baf566eb33a22bf12a48e4cdc7c99611bde934 Mon Sep 17 00:00:00 2001
> From: Adrian Hunter <adrian.hunter@xxxxxxxxx>
> Date: Wed, 5 May 2010 14:07:55 +0300
> Subject: [PATCH] mmc: add an ioctl for erasing
> As SD and MMC cards have a NAND core, they can support an erase
> operation that is typically 10x to 100x faster than writing.
> In addition, eMMCv4.4 also offers:
> o Secure Erase
> o Trim
> o Secure Trim
> The "secure" variants also ensure that any copies of the data
> (for example remnants of garbage collection) are also erased.
> "Trim" is the same as "erase" except that individual sectors
> can be erased instead of whole Erase Groups.
> The Erase Operation and its variants are not supported by
> default and drivers must set MMC_CAP_ERASE. This is because
> the operation can take a long time and drivers that rely on
> polling the status may perform very badly. Also drivers
> may need changes to support the very long erase timeouts.

Please don't add new device specific ioctls. Just implement the
block layer discard operation to make the discard ioctl work on MMC
device. We can talk about adding a secure erase variant of it then.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at