9p: add 9P2000.L rename operation
I made a V2 of this patch on top of my patches for VFS switches. All the changes were due to change in some offsets. rename - change name of file or directory size[4] Trename tag[2] fid[4] newdirfid[4] name[s] size[4] Rrename tag[2] The rename message is used to change the name of a file, possibly moving it to a new directory. The 9P wstat message can only rename a file within the same directory. Signed-off-by: Jim Garlick <garlick@llnl.gov> Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
This commit is contained in:
committed by
Eric Van Hensbergen
parent
bda8e77520
commit
4681dbdacb
@@ -794,6 +794,13 @@ v9fs_vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
||||
goto clunk_olddir;
|
||||
}
|
||||
|
||||
if (v9fs_proto_dotl(v9ses)) {
|
||||
retval = p9_client_rename(oldfid, newdirfid,
|
||||
(char *) new_dentry->d_name.name);
|
||||
if (retval != -ENOSYS)
|
||||
goto clunk_newdir;
|
||||
}
|
||||
|
||||
/* 9P can only handle file rename in the same directory */
|
||||
if (memcmp(&olddirfid->qid, &newdirfid->qid, sizeof(newdirfid->qid))) {
|
||||
P9_DPRINTK(P9_DEBUG_ERROR,
|
||||
|
||||
Reference in New Issue
Block a user