summaryrefslogtreecommitdiffstats
path: root/lib/libstand/stand.h
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>2000-09-05 09:52:50 +0000
committermsmith <msmith@FreeBSD.org>2000-09-05 09:52:50 +0000
commit6ff92c14b7a65f64dea4e0d4e8d19b2dcf3f57b3 (patch)
treeded2222e22c2d532e900757ec03c1d5306a3e570 /lib/libstand/stand.h
parent75c63c707d89253e9bd44217d8975ec16bec5aa5 (diff)
downloadFreeBSD-src-6ff92c14b7a65f64dea4e0d4e8d19b2dcf3f57b3.zip
FreeBSD-src-6ff92c14b7a65f64dea4e0d4e8d19b2dcf3f57b3.tar.gz
Implement readahead buffering for non-raw files. This drastically improves
the efficiency of byte-by-byte read operations on filesystems not already supported by the block cache (especially NFS). This should be a welcome change for users booting via PXE, as the loader now reads its startup files almost instantly, instead of taking tens of seconds.
Diffstat (limited to 'lib/libstand/stand.h')
-rw-r--r--lib/libstand/stand.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libstand/stand.h b/lib/libstand/stand.h
index aa8e65f..e48565a 100644
--- a/lib/libstand/stand.h
+++ b/lib/libstand/stand.h
@@ -159,7 +159,11 @@ struct open_file {
void *f_devdata; /* device specific data */
struct fs_ops *f_ops; /* pointer to file system operations */
void *f_fsdata; /* file system specific data */
- off_t f_offset; /* current file offset (F_RAW) */
+ off_t f_offset; /* current file offset */
+ char *f_rabuf; /* readahead buffer pointer */
+ size_t f_ralen; /* valid data in readahead buffer */
+ off_t f_raoffset; /* consumer offset in readahead buffer */
+#define SOPEN_RASIZE 512
};
#define SOPEN_MAX 8
OpenPOWER on IntegriCloud