[Yaffs] Re: power fail testing

Sergei Sharonov sergei.sharonov@halliburton.com
Thu, 28 Apr 2005 17:36:58 +0000 (UTC)


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