Re: [PATCH 7/7] readahead: basic support of interleaved reads

Fengguang Wu
2007-07-21T07:57:55Z

On Sat, Jul 21, 2007 at 05:24:39PM +1000, Rusty Russell wrote:
> This is really clever!

Thank you :)

> Only one slight complaint: I wonder if "radix_tree_scan_hole" could be
> expressed as "radix_tree_extent_size" which return the number of

In fact the full context based readahead requires three functions:

- radix_tree_scan_hole(root, index, max_scan)
- radix_tree_scan_hole_backward(root, index, max_scan)
- radix_tree_scan_data_backward(root, index, max_scan)

I would be very glad if you can work up a consistent naming scheme
for them all ;)

> populated indices up to "max_scan". Returning a length seems more
> intuitive to me (and I think gets rid of the wraparound error case?)

No, changing the return value won't eliminate the wraparound case.

But I guess we can safely assume that it won't wrap around at all?
The last page in the pagecache address space will not be
granted/allocated thanks to the not-too-aggressive MAX_LFS_FILESIZE?