diff options
author | Steve French <sfrench@us.ibm.com> | 2008-03-14 22:37:16 +0000 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-03-14 22:37:16 +0000 |
commit | 8b1327f6ed957030a64ccdb17131955bfea2d3fe (patch) | |
tree | 075ff00b4c333ef333aff5927eac45bde16d8d53 /fs/cifs/inode.c | |
parent | ebe8912be214662c8289977fb416c1f015df4a0b (diff) | |
download | kernel_samsung_smdk4412-8b1327f6ed957030a64ccdb17131955bfea2d3fe.zip kernel_samsung_smdk4412-8b1327f6ed957030a64ccdb17131955bfea2d3fe.tar.gz kernel_samsung_smdk4412-8b1327f6ed957030a64ccdb17131955bfea2d3fe.tar.bz2 |
[CIFS] file create with acl support enabled is slow
Shirish Pargaonkar noted:
With cifsacl mount option, when a file is created on the Windows server,
exclusive oplock is broken right away because the get cifs acl code
again opens the file to obtain security descriptor.
The client does not have the newly created file handle or inode in any
of its lists yet so it does not respond to oplock break and server waits for
its duration and then responds to the second open. This slows down file
creation signficantly. The fix is to pass the file descriptor to the get
cifsacl code wherever available so that get cifs acl code does not send
second open (NT Create ANDX) and oplock is not broken.
CC: Shirish Pargaonkar <shirishp@us.ibm.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r-- | fs/cifs/inode.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index e57e5c4..7e4c244 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -371,7 +371,7 @@ static int get_sfu_mode(struct inode *inode, int cifs_get_inode_info(struct inode **pinode, const unsigned char *search_path, FILE_ALL_INFO *pfindData, - struct super_block *sb, int xid) + struct super_block *sb, int xid, const __u16 *pfid) { int rc = 0; struct cifsTconInfo *pTcon; @@ -569,7 +569,7 @@ try_again_CIFSSMBQPathInfo: /* fill in 0777 bits from ACL */ if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) { cFYI(1, ("Getting mode bits from ACL")); - acl_to_uid_mode(inode, search_path); + acl_to_uid_mode(inode, search_path, pfid); } #endif if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) { @@ -616,7 +616,8 @@ struct inode *cifs_iget(struct super_block *sb, unsigned long ino) if (cifs_sb->tcon->unix_ext) rc = cifs_get_inode_info_unix(&inode, "", inode->i_sb, xid); else - rc = cifs_get_inode_info(&inode, "", NULL, inode->i_sb, xid); + rc = cifs_get_inode_info(&inode, "", NULL, inode->i_sb, xid, + NULL); if (rc && cifs_sb->tcon->ipc) { cFYI(1, ("ipc connection - fake read inode")); inode->i_mode |= S_IFDIR; @@ -949,7 +950,7 @@ mkdir_get_info: inode->i_sb, xid); else rc = cifs_get_inode_info(&newinode, full_path, NULL, - inode->i_sb, xid); + inode->i_sb, xid, NULL); if (pTcon->nocase) direntry->d_op = &cifs_ci_dentry_ops; @@ -1231,7 +1232,7 @@ int cifs_revalidate(struct dentry *direntry) } } else { rc = cifs_get_inode_info(&direntry->d_inode, full_path, NULL, - direntry->d_sb, xid); + direntry->d_sb, xid, NULL); if (rc) { cFYI(1, ("error on getting revalidate info %d", rc)); /* if (rc != -ENOENT) |