Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

nfs: add support for large folios

NFS already is void of folio size assumption, so just pass the chunk size
to __filemap_get_folio and set the large folio address_space flag for all
regular files.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>

authored by

Christoph Hellwig and committed by
Anna Schumaker
49b29a57 9aac777a

+4 -1
+3 -1
fs/nfs/file.c
··· 339 339 loff_t pos, unsigned len, struct page **pagep, 340 340 void **fsdata) 341 341 { 342 + fgf_t fgp = FGP_WRITEBEGIN; 342 343 struct folio *folio; 343 344 int once_thru = 0; 344 345 int ret; ··· 347 346 dfprintk(PAGECACHE, "NFS: write_begin(%pD2(%lu), %u@%lld)\n", 348 347 file, mapping->host->i_ino, len, (long long) pos); 349 348 349 + fgp |= fgf_set_order(len); 350 350 start: 351 - folio = __filemap_get_folio(mapping, pos >> PAGE_SHIFT, FGP_WRITEBEGIN, 351 + folio = __filemap_get_folio(mapping, pos >> PAGE_SHIFT, fgp, 352 352 mapping_gfp_mask(mapping)); 353 353 if (IS_ERR(folio)) 354 354 return PTR_ERR(folio);
+1
fs/nfs/inode.c
··· 491 491 inode->i_fop = NFS_SB(sb)->nfs_client->rpc_ops->file_ops; 492 492 inode->i_data.a_ops = &nfs_file_aops; 493 493 nfs_inode_init_regular(nfsi); 494 + mapping_set_large_folios(inode->i_mapping); 494 495 } else if (S_ISDIR(inode->i_mode)) { 495 496 inode->i_op = NFS_SB(sb)->nfs_client->rpc_ops->dir_inode_ops; 496 497 inode->i_fop = &nfs_dir_operations;