]> git.baikalelectronics.ru Git - kernel.git/commit
ksmbd: set fixed sector size to FS_SECTOR_SIZE_INFORMATION
authorNamjae Jeon <linkinjeon@kernel.org>
Wed, 13 Apr 2022 01:01:36 +0000 (10:01 +0900)
committerSteve French <stfrench@microsoft.com>
Fri, 15 Apr 2022 01:56:13 +0000 (20:56 -0500)
commite3c6a6c78ef82201e1ee78c080e9018f54b7c85d
treeefdb532efcbb4cca7436024e156ccd9702951ea4
parent621ea2c79c6c49a55ea7e7addda9bd67bcefaca4
ksmbd: set fixed sector size to FS_SECTOR_SIZE_INFORMATION

Currently ksmbd is using ->f_bsize from vfs_statfs() as sector size.
If fat/exfat is a local share, ->f_bsize is a cluster size that is too
large to be used as a sector size. Sector sizes larger than 4K cause
problem occurs when mounting an iso file through windows client.

The error message can be obtained using Mount-DiskImage command,
 the error is:
"Mount-DiskImage : The sector size of the physical disk on which the
virtual disk resides is not supported."

This patch reports fixed 4KB sector size if ->s_blocksize is bigger
than 4KB.

Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/ksmbd/smb2pdu.c