[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: How much flash?



Thank you.

Ujwal

On Fri, 2001-10-12 at 00:15, Jonas Holmberg wrote:
> > Thanks for the info. According to the ptablespec which I haven't
> > changed, the size of jffs on /dev/flash2 is 0x50000 (327680) 
> > bytes. But
> > according to df, I had only 192 1K blocks. Is df wrong?
> 
> JFFS reserves 2 blocks (2*64k) for garbage collection.
> 
> > 
> > I had another question anbout the file system on flash. When 
> > I put a new
> > image on the board, I also put a few binaries on /mnt/flash. 
> > After that,
> > /dev/flash2 was about 71% full according to df. I then tried to
> > overwrite one of the binaries (~75k) with ftp, but I got a 
> > "No space on
> > device" error.
> 
> That makes sense: (192*(1-0.71)) < 75.
> 
> There's no such think as "overwrite" when it comes to flash chips. There's just
> write and erase (erase of at least an entire block) so "overwrite" is handled by JFFS.
> 
> > I the tried removing the binary with rm, by no 
> > space was
> > reclaimed. What do I need to do to remove files from /mnt/flash and
> > reclaim space?
> 
> You shouldn't have to think about that. I think JFFS does GC before the next write,
> but I'm not sure about the algorithms (ask on the jffs-dev mailing list or look
> at the source code in os/linux/fs/jffs :-).
> 
> Best regards
> /Jonas