Subject: Re: Upgrading cramfs root file system while running (DENX wrote that is not possible)

From: Tolunay Orkun <[email-masked]>
Date: Sat, 22 Apr 2006 14:07:36 -0500

Wolfgang Denk wrote:
> In message <[email-masked]> you wrote:
>   
>> No, I have a cramfs on flash and the kernel uses it directly from flash,
>> extracting what it needs to execute. I'm not using initrd then, I have to
>> update in situ, while running.
>>     
>
> This cannot be done reliably. You have to make the file system  idle,
> i. e. unmount it.
>   
I agree, even if you make the executables involved in the update 
statically linked (so library dependencies are removed), kernel can 
choose to reload any running executables page and it would end up with a 
bogus page in memory. This is particularly true if you do not have swap 
which you could try to lock executable in swap. Also, you cannot 
reliably depend on file system cache to contain all the executable code 
you would need to complete update either.

Regards,
Tolunay