diff options
author | Rohith Surabattula <rohiths@microsoft.com> | 2022-03-07 21:37:22 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2022-03-19 07:06:28 +0300 |
commit | 06a466565d54a1a42168f9033a062a3f5c40e73b (patch) | |
tree | edea59338cdfc4209552267bd1ec2509d434d17d /fs/cifs/cifsfs.c | |
parent | 84330d41efb12bc227899e54dbdbe7d9590cb2b7 (diff) | |
download | linux-06a466565d54a1a42168f9033a062a3f5c40e73b.tar.xz |
Adjust cifssb maximum read size
When session gets reconnected during mount then read size in super block fs context
gets set to zero and after negotiate, rsize is not modified which results in
incorrect read with requested bytes as zero. Fixes intermittent failure
of xfstest generic/240
Note that stable requires a different version of this patch which will be
sent to the stable mailing list.
Signed-off-by: Rohith Surabattula <rohiths@microsoft.com>
Acked-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index a61bb5d683c6..677c02aa8731 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -210,6 +210,9 @@ cifs_read_super(struct super_block *sb) if (rc) goto out_no_root; /* tune readahead according to rsize if readahead size not set on mount */ + if (cifs_sb->ctx->rsize == 0) + cifs_sb->ctx->rsize = + tcon->ses->server->ops->negotiate_rsize(tcon, cifs_sb->ctx); if (cifs_sb->ctx->rasize) sb->s_bdi->ra_pages = cifs_sb->ctx->rasize / PAGE_SIZE; else |