Re: [Yaffs] Re: Performance of overwrite vs new file

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: yaffs
CC: Sergei Sharonov
Subject: Re: [Yaffs] Re: Performance of overwrite vs new file
On Thursday 13 October 2005 12:36, Sergei Sharonov wrote:
> Hi,
>
> > Can YAFFS detect this situation and effectively "unlink" the file first?
>
> No, it should not. If the power is cycled between the unlink and open you
> will end up with no file at all. This is not an expected behaviour. It is
> ok to unlink and open from your application as long as you understand the
> repercussions but IMHO it is not ok to do it behind the scene.


I don't think Peter meant actual unlinking, by 'effectively "unlink"' he meant
some sequence like I outlined, but loss safe (eg. perhaps using the shadowing
mechanism used to cover the "rename over" problem).

But thanx Sergei, I really appreciate you pointing out the rename over problem
(though it was a pig to fix) and I really appreciate the attention to detail.

-- Charles