smb3: optimize open to not send query file internal info
We can cut one third of the traffic on open by not querying the inode number explicitly via SMB3 query_info since it is now returned on open in the qfid context. This is better in multiple ways, and speeds up file open about 10% (more if network is slow). Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
@@ -88,14 +88,20 @@ smb2_open_file(const unsigned int xid, struct cifs_open_parms *oparms,
|
||||
}
|
||||
|
||||
if (buf) {
|
||||
/* open response does not have IndexNumber field - get it */
|
||||
rc = SMB2_get_srv_num(xid, oparms->tcon, fid->persistent_fid,
|
||||
/* if open response does not have IndexNumber field - get it */
|
||||
if (smb2_data->IndexNumber == 0) {
|
||||
rc = SMB2_get_srv_num(xid, oparms->tcon,
|
||||
fid->persistent_fid,
|
||||
fid->volatile_fid,
|
||||
&smb2_data->IndexNumber);
|
||||
if (rc) {
|
||||
/* let get_inode_info disable server inode numbers */
|
||||
smb2_data->IndexNumber = 0;
|
||||
rc = 0;
|
||||
if (rc) {
|
||||
/*
|
||||
* let get_inode_info disable server inode
|
||||
* numbers
|
||||
*/
|
||||
smb2_data->IndexNumber = 0;
|
||||
rc = 0;
|
||||
}
|
||||
}
|
||||
move_smb2_info_to_cifs(buf, smb2_data);
|
||||
}
|
||||
|
Reference in New Issue
Block a user