[Yaffs] Re: Chunk Cache BUG

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Wookey
Date:  
To: yaffs
Subject: [Yaffs] Re: Chunk Cache BUG
On 06-09-06 11:36 +1200, Charles Manning wrote:
> Folks
>
> Sorry I thought I had checked in a fix, but I had not.
>
> It is now sorted in cvs
>
> http://www.aleph1.co.uk/cgi-bin/viewcvs.cgi/yaffs2/yaffs_guts.c?r1=1.35&r2=1.36
>
>
> The problem that was occurring would only happen if you did a modification
> like a chmod just before closing the file, then a reset. The chmod would say
> that the file was no longer dirty (but it was, because there's still dirty in
> the cache.
>
> The solution is to only mark the file clean if the cache is also empty. I
> chose to do this rather than Artis' fix because that can result in far more
> writes (when you might not be expecting them).


So far as I cen see from preusing the code this fix needs to go in the
yaffs1 codebase too. Is it in fact not necessary for some reason?

I wonder if it also fixes Laurence Withers' example about renaming a
file just before closing it in :
http://aleph1.co.uk/lurker/list/message/20060817.102559.b5a65eed.en.html

Renaming would alter the header only in the same way that the chmod
would, and thus suffer the same problem with caching.

Wookey
-- 
Aleph One Ltd, Bottisham, CAMBRIDGE, CB5 9BA, UK  Tel +44 (0) 1223 811679
work: http://www.aleph1.co.uk/                 play: http://wookware.org/