[ECOS] Correct approach with FAT16 FS & pluggable media?

Ian Rothwell ian.rothwell@prestigemedical.co.uk
Mon Jun 12 16:01:00 GMT 2006

Hello there (Savin?),
	I'm running the FAT16 package on MMC reliably (if a little slowly...)
but after putting it off for some months I'm now unavoidably at the stage
where I need to safely hot unplug/replug the flash card. Looking at it I
guessed it'd just be a case of umounting root (having initially mounted
the FS at boot), then remounting later, but on umount fatfs.c:fat_fs_umount
is failing before getting to delete the block layer cache when
fatfs_get_live_node_count(disk) is tested. I guess this ties in with
where the code talks about the file system needing to be empty for a
successful umount, but I'm not sure how to empty it, short of closing all
open files/dirs and that's been tried. A successful flush/sync of the block
cache isn't really critical for me at the moment, more important for now is
for it to be properly scrapped on card unplug, to make way for a fresh block
lib instance when root is subsequently remounted after the card's come back
in (with its files externally edited) and been brought back online in my


Ian Rothwell
Prestige Medical ltd.

Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

More information about the Ecos-discuss mailing list