Hello,
well, there are 3 options:
1) Don't erase anything, just format the drive/paritition, which means normal write to few first sectors with partition information, FAT table and root directory. That's what MFS does during format. The old data are not accesible anymore.
2) Simply write some pattern (zeros) all over the SD card space.
3) Add support for SD SPI erase commands that should behave similarly to CMD24 which is already there. And there should be new erase IOCTL command at generic SD card level calling the new low level SD SPI commands.
Regards,
PetrM