public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Removable MTD device
@ 2006-11-29  0:50 Gavin Lambert
  0 siblings, 0 replies; only message in thread
From: Gavin Lambert @ 2006-11-29  0:50 UTC (permalink / raw)
  To: linux-mtd

What's the best way to implement a removable MTD device?

Specifically, I've got a DataFlash card with an MMC footprint.  For
fault tolerance and graycoding I'd like to use JFFS2 on it, since that
seems like a good choice.  (Compatibility isn't an issue here since most
devices can't read DF cards anyway.)

However, the problem comes when the user inserts or removes the card
while the system is running.  I can do change detection readily enough
(through polling for the card's status periodically), but I'm not sure
how I should then pass that on to MTD and the rest of the system.  In
particular, what should I do if the filesystem is mounted?  Ideally I'd
like to auto-demount it, even if there is outstanding activity (since
there's no possible way it could succeed, since the card isn't there any
more).

I was also wondering how safe it is to change MTD device parameters
(such as type/size/etc) while the device is 'added'.  I don't really
want to remove and re-add the device on remove and insert events, since
that could change the device number.  So how safe is it to just flip the
type/size of an existing MTD device to MTD_ABSENT/0 on removal?

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-11-29  0:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-29  0:50 Removable MTD device Gavin Lambert

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