linux-nfs / nfsd

Linux kernel source tree
Other
0 stars 0 forks source link

READ without populating unallocated file pages #39

Open chucklever opened 7 months ago

chucklever commented 7 months ago

A file can have unallocated extents. When a range of unallocated bytes in a file is read normally, that usually results in zero pages being populated in the page cache.

For large sparse files, we'd prefer if NFSD did not cause those page cache pages to be populated on READ. In particular, NFSv4.2 READ_PLUS should be able to handle unallocated byte ranges by returning HOLE segments and not populating those pages.

chucklever commented 6 months ago

Could be the getting READ_PLUS to work without races might be a separate problem. We really want a sparse read operation at the VFS layer. iomap works only for some file systems, but we're not sure it addresses the races.