Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
b=22310 temporary fix: align readahead window end to 1M rpc boundary.
[fs/lustre-release.git]
/
lustre
/
llite
/
rw.c
diff --git
a/lustre/llite/rw.c
b/lustre/llite/rw.c
index
ea1817f
..
df40ae6
100644
(file)
--- a/
lustre/llite/rw.c
+++ b/
lustre/llite/rw.c
@@
-746,8
+746,15
@@
int ll_readahead(const struct lu_env *env, struct cl_io *io,
end = ras->ras_window_start + ras->ras_window_len - 1;
}
if (end != 0) {
end = ras->ras_window_start + ras->ras_window_len - 1;
}
if (end != 0) {
+ unsigned long tmp_end;
+ /* Align RA window to optimal RPC boundary */
+ tmp_end = ((end + 1) & (~(PTLRPC_MAX_BRW_PAGES - 1))) - 1;
+ if (tmp_end > start)
+ end = tmp_end;
+
/* Truncate RA window to end of file */
end = min(end, (unsigned long)((kms - 1) >> CFS_PAGE_SHIFT));
/* Truncate RA window to end of file */
end = min(end, (unsigned long)((kms - 1) >> CFS_PAGE_SHIFT));
+
ras->ras_next_readahead = max(end, end + 1);
RAS_CDEBUG(ras);
}
ras->ras_next_readahead = max(end, end + 1);
RAS_CDEBUG(ras);
}