Query File System Alignment
In SMB3 it is now possible to query the file system alignment info, and the preferred (for performance) sector size and whether the underlying disk has no seek penalty (like SSD). Query this information at mount time for SMB3, and make it visible in /proc/fs/cifs/DebugData for debugging purposes. This alignment information and preferred sector size info will be helpful for the copy offload patches to setup the right chunks in the CopyChunk requests. Presumably the knowledge that the underlying disk is SSD could also help us make better readahead and writebehind decisions (something to look at in the future). Signed-off-by: Steve French <smfrench@gmail.com>
Este cometimento está contido em:

cometido por
Steve French

ascendente
2167114c6e
cometimento
af6a12ea8d
@@ -2373,8 +2373,11 @@ SMB2_QFS_attr(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
} else if (level == FS_ATTRIBUTE_INFORMATION) {
|
||||
max_len = sizeof(FILE_SYSTEM_ATTRIBUTE_INFO);
|
||||
min_len = MIN_FS_ATTR_INFO_SIZE;
|
||||
} else if (level == FS_SECTOR_SIZE_INFORMATION) {
|
||||
max_len = sizeof(struct smb3_fs_ss_info);
|
||||
min_len = sizeof(struct smb3_fs_ss_info);
|
||||
} else {
|
||||
cifs_dbg(FYI, "Invalid qfsinfo level %d", level);
|
||||
cifs_dbg(FYI, "Invalid qfsinfo level %d\n", level);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -2403,6 +2406,13 @@ SMB2_QFS_attr(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
else if (level == FS_DEVICE_INFORMATION)
|
||||
memcpy(&tcon->fsDevInfo, 4 /* RFC1001 len */ + offset
|
||||
+ (char *)&rsp->hdr, sizeof(FILE_SYSTEM_DEVICE_INFO));
|
||||
else if (level == FS_SECTOR_SIZE_INFORMATION) {
|
||||
struct smb3_fs_ss_info *ss_info = (struct smb3_fs_ss_info *)
|
||||
(4 /* RFC1001 len */ + offset + (char *)&rsp->hdr);
|
||||
tcon->ss_flags = le32_to_cpu(ss_info->Flags);
|
||||
tcon->perf_sector_size =
|
||||
le32_to_cpu(ss_info->PhysicalBytesPerSectorForPerf);
|
||||
}
|
||||
|
||||
qfsattr_exit:
|
||||
free_rsp_buf(resp_buftype, iov.iov_base);
|
||||
|
Criar uma nova questão referindo esta
Bloquear um utilizador