From 95100f4d9a9a0d32bc0818da56f78bf79b85b4c5 Mon Sep 17 00:00:00 2001 From: adilger Date: Tue, 16 Mar 2004 21:13:48 +0000 Subject: [PATCH] Don't spew errors during readahead. --- lustre/llite/rw.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index 4d6df97..d6c9f63 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -535,9 +535,6 @@ static int ll_page_matches(struct page *page) ll_i2info(inode)->lli_smd, LDLM_EXTENT, &page_extent, LCK_PR | LCK_PW, &flags, inode, &match_lockh); - if (matches < 0) - LL_CDEBUG_PAGE(D_ERROR, page, "lock match failed: rc %d\n", - matches); RETURN(matches); } @@ -612,9 +609,15 @@ static void ll_readahead(struct ll_readahead_state *ras, /* the book-keeping above promises that we've tried * all the indices from start to end, so we don't * stop if anyone returns an error. This may not be good. */ - if (Page_Uptodate(page) || ll_page_matches(page) <= 0) + if (Page_Uptodate(page)) goto next_page; + if ((rc = ll_page_matches(page)) <= 0) { + LL_CDEBUG_PAGE(D_READA | D_PAGE, page, + "lock match failed: rc %d\n", rc); + goto next_page; + } + llap = llap_from_page(page); if (IS_ERR(llap) || llap->llap_defer_uptodate) goto next_page; @@ -773,8 +776,10 @@ int ll_readpage(struct file *filp, struct page *page) ll_readahead_update(inode, &fd->fd_ras, page->index, 0); rc = ll_page_matches(page); - if (rc < 0) + if (rc < 0) { + LL_CDEBUG_PAGE(D_ERROR, page, "lock match failed: rc %d\n", rc); GOTO(out, rc); + } if (rc == 0) { static unsigned long next_print; -- 1.8.3.1