[Yaffs] Re: power fail testing

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Sergei Sharonov
Date:  
To: yaffs
New-Topics: Re: [Yaffs] Re: power fail testing -->rename problem
Subject: [Yaffs] Re: power fail testing
Hi,
> Rename() suppose to be atomic per
> http://www.opengroup.org/onlinepubs/007908799/xsh/rename.html:
> "If the link named by the new argument exists, it is removed and
> old renamed to new. In this case, a link named new will remain
> visible to other processes throughout the renaming operation and
> will refer either to the file referred to by new or old before
> the operation began."


In yaffs_fs.c : yaffs_rename():
 removed = yaffs_Unlink(yaffs_InodeToObject(new_dir),new_dentry->d_name.name);
 retVal = yaffs_RenameObject(yaffs_InodeToObject(old_dir),
                            old_dentry->d_name.name,                                   
yaffs_InodeToObject(new_dir),
                            new_dentry->d_name.name);

                

Is sequencing a problem here?

Sergei