mfs: minor cleanup of readahead: they can be private to read.c.
This commit is contained in:
parent
e2730c3e2f
commit
a89bcc465b
3 changed files with 9 additions and 6 deletions
|
@ -9,9 +9,6 @@
|
|||
|
||||
#include <minix/vfsif.h>
|
||||
|
||||
EXTERN off_t rdahedpos; /* position to read ahead */
|
||||
EXTERN struct inode *rdahed_inode; /* pointer to inode to read ahead */
|
||||
|
||||
/* The following variables are used for returning results to the caller. */
|
||||
EXTERN int err_code; /* temporary storage for error number */
|
||||
EXTERN int rdwt_err; /* status of last disk i/o request */
|
||||
|
|
|
@ -67,7 +67,7 @@ PUBLIC int main(int argc, char *argv[])
|
|||
fs_m_out.m_type = error;
|
||||
reply(src, &fs_m_out);
|
||||
|
||||
if (error == OK && rdahed_inode != NULL)
|
||||
if (error == OK)
|
||||
read_ahead(); /* do block read ahead */
|
||||
|
||||
}
|
||||
|
|
|
@ -20,6 +20,9 @@ FORWARD _PROTOTYPE( int rw_chunk, (struct inode *rip, u64_t position,
|
|||
|
||||
PRIVATE char getdents_buf[GETDENTS_BUFSIZ];
|
||||
|
||||
PRIVATE off_t rdahedpos; /* position to read ahead */
|
||||
PRIVATE struct inode *rdahed_inode; /* pointer to inode to read ahead */
|
||||
|
||||
/*===========================================================================*
|
||||
* fs_readwrite *
|
||||
*===========================================================================*/
|
||||
|
@ -401,6 +404,9 @@ PUBLIC void read_ahead()
|
|||
struct buf *bp;
|
||||
block_t b;
|
||||
|
||||
if(!rdahed_inode)
|
||||
return;
|
||||
|
||||
rip = rdahed_inode; /* pointer to inode to read ahead from */
|
||||
block_size = get_block_size(rip->i_dev);
|
||||
rdahed_inode = NULL; /* turn off read ahead */
|
||||
|
|
Loading…
Reference in a new issue