Skip to content
Snippets Groups Projects
Commit e9639431 authored by Andreas Dilger's avatar Andreas Dilger
Browse files

Branch b1_6

Add some explanatory comments.
parent 9f1f8886
No related branches found
No related tags found
No related merge requests found
......@@ -1446,7 +1446,9 @@ int ll_readpage(struct file *filp, struct page *page)
ras_update(ll_i2sbi(inode), inode, &fd->fd_ras, page->index,
llap->llap_defer_uptodate);
if (llap->llap_defer_uptodate) {
/* This is the callpath if we got the page from a readahead */
llap->llap_ra_used = 1;
rc = ll_readahead(&fd->fd_ras, exp, page->mapping, oig,
fd->fd_flags);
......@@ -1462,7 +1464,8 @@ int ll_readpage(struct file *filp, struct page *page)
if (likely((fd->fd_flags & LL_FILE_IGNORE_LOCK) == 0)) {
rc = ll_page_matches(page, fd->fd_flags);
if (rc < 0) {
LL_CDEBUG_PAGE(D_ERROR, page, "lock match failed: rc %d\n", rc);
LL_CDEBUG_PAGE(D_ERROR, page,
"lock match failed: rc %d\n", rc);
GOTO(out, rc);
}
......@@ -1479,6 +1482,8 @@ int ll_readpage(struct file *filp, struct page *page)
GOTO(out, rc);
LL_CDEBUG_PAGE(D_PAGE, page, "queued readpage\n");
/* We have just requested the actual page we want, see if we can tack
* on some readahead to that page's RPC before it is sent. */
if (ll_i2sbi(inode)->ll_ra_info.ra_max_pages)
ll_readahead(&fd->fd_ras, exp, page->mapping, oig,
fd->fd_flags);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment