Commit 5e9039ff authored by Mike Hibler's avatar Mike Hibler
Browse files

Add -R option to allow setting of readahead.

parent 51ee0939
...@@ -151,7 +151,7 @@ main(int argc, char **argv) ...@@ -151,7 +151,7 @@ main(int argc, char **argv)
int dostype = -1; int dostype = -1;
int slice = 0; int slice = 0;
while ((ch = getopt(argc, argv, "dhp:m:s:i:tbznT:r:E:D:C:W:S:M:")) != -1) while ((ch = getopt(argc, argv, "dhp:m:s:i:tbznT:r:E:D:C:W:S:M:R:")) != -1)
switch(ch) { switch(ch) {
case 'd': case 'd':
debug++; debug++;
...@@ -243,6 +243,15 @@ main(int argc, char **argv) ...@@ -243,6 +243,15 @@ main(int argc, char **argv)
maxmem = mem; maxmem = mem;
break; break;
case 'R':
maxreadahead = atoi(optarg);
if (maxinprogress < maxreadahead * 4) {
maxinprogress = maxreadahead * 4;
if (maxinprogress > maxchunkbufs)
maxinprogress = maxchunkbufs;
}
break;
case 'h': case 'h':
case '?': case '?':
default: default:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment