[linux-cifs-client] Re: fixed cifs_rename patch + updated pull request

Jeff Layton jlayton at redhat.com
Tue Oct 21 12:35:05 GMT 2008


On Mon, 20 Oct 2008 13:47:48 -0500
"Steve French" <smfrench at gmail.com> wrote:

> OK - have merged the patch:
> 
> cifs: make cifs_rename handle -EACCES errors
> 
> and fixed the extra brace.  This code needs testing against various
> servers now (especially NetApp)
> 

Ok, I've already found something that this has broken...

Before, we'd call cifs_unlink to handle the removing of the target file
if it exists. Now, we're attempting to do a busy-file unlink when we
find that the target file exists. Netapp servers don't support the
trans2 rename, so we're not able to rename one file on top of another
after this patch.

Obviously, we can't leave it like this, but that does mean that
renaming one file on top of another like this won't be undoable. If we
unlink the file and then the rename fails for some reason, we can't put
back the original file.

So this brings up another question -- should we even bother to try and
make cifs_rename "undoable" on servers that do support the proper calls
for trans2 rename? i.e. should I rip out all of the "undo" code in
cifs_rename and just have it call cifs_unlink? It would certainly
simplify the code...

-- 
Jeff Layton <jlayton at redhat.com>


More information about the linux-cifs-client mailing list