mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 07:04:10 +08:00
cifs: Fix the readahead conversion to manage the batch when reading from cache
Fix the readahead conversion to correctly manage the last batch skipping when reading from cache. This involves a readahead batch of one page or one folio, so set the batch size according to the number of constituent pages (should be 1 for a filesystem that doesn't do multipage folios yet). Signed-off-by: David Howells <dhowells@redhat.com> cc: Steve French <smfrench@gmail.com> Reviewed-by: Rohith Surabattula <rohiths.msft@gmail.com> Reviewed-by: Shyam Prasad N <nspmangalore@gmail.com> cc: Jeff Layton <jlayton@kernel.org> cc: linux-cifs@vger.kernel.org Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
0174ee9947
commit
46f5cbdef7
@ -4446,7 +4446,7 @@ static void cifs_readahead(struct readahead_control *ractl)
|
||||
* by the cache.
|
||||
*/
|
||||
page = readahead_page(ractl);
|
||||
|
||||
last_batch_size = 1 << thp_order(page);
|
||||
if (cifs_readpage_from_fscache(ractl->mapping->host,
|
||||
page) < 0) {
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user