From f224fc4424dd459f641ae1b2e2766ec7d727a23f Mon Sep 17 00:00:00 2001 From: wangdi <wangdi> Date: Mon, 30 Jun 2008 18:59:15 +0000 Subject: [PATCH] Branch b1_6 Two minor fixes for stride read-ahead. b=14483 i=adilger --- lustre/llite/rw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index ef484d985f..e79fa25ec2 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -1251,7 +1251,7 @@ stride_pg_count(pgoff_t st_off, unsigned long st_len, unsigned long st_pgs, unsigned long off, unsigned length) { unsigned long cont_len = st_off > off ? st_off - off : 0; - unsigned long stride_len = length + off > st_off ? + __u64 stride_len = length + off > st_off ? length + off + 1 - st_off : 0; unsigned long left, pg_count; @@ -1409,7 +1409,7 @@ static int ll_readahead(struct ll_readahead_state *ras, RETURN(0); reserved = ll_ra_count_get(ll_i2sbi(inode), len); - if (reserved < end - start + 1) + if (reserved < len) ll_ra_stats_inc(mapping, RA_STAT_MAX_IN_FLIGHT); CDEBUG(D_READA, "reserved page %lu \n", reserved); -- GitLab