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

Re: Calculating free and dirty blocks




bmatthews@xxxxxxx.com said:
> Does anyone know the most (time) efficient way to calculate the number
> of free and dirty blocks in a jffs file system (from within the kernel
> of course)?

I'm not sure exactly what you're trying to calculate. 

The free and dirty sizes in bytes are available as fmc->dirty_size and 
(fmc->flash_size - (fmc->used_size + fmc->dirty_size)), respectively. The 
existing jffs_garbage_collect() uses these to determine when to stop.

Are those what you wanted?


--
dwmw2