diff options
author | grog <grog@FreeBSD.org> | 1999-08-26 03:27:21 +0000 |
---|---|---|
committer | grog <grog@FreeBSD.org> | 1999-08-26 03:27:21 +0000 |
commit | 6cb95ba77922c17e9beb2eb52bfcf28961c59d3f (patch) | |
tree | c1260f88057f75be7569c93bd96969ebd81574c9 /sys/dev | |
parent | f94d5d264d6405bbda84b93b6b6e299ee1c133b2 (diff) | |
download | FreeBSD-src-6cb95ba77922c17e9beb2eb52bfcf28961c59d3f.zip FreeBSD-src-6cb95ba77922c17e9beb2eb52bfcf28961c59d3f.tar.gz |
read_drive: Remove references to vp->v_lastr, which is going away.
Reviewed-by: dillon
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/vinum/vinumio.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/sys/dev/vinum/vinumio.c b/sys/dev/vinum/vinumio.c index aeed2f9..d49eb3a 100644 --- a/sys/dev/vinum/vinumio.c +++ b/sys/dev/vinum/vinumio.c @@ -246,9 +246,8 @@ remove_drive(int driveno) } /* - * Read data from a drive - * - * Return error number + * Read data from a drive. + * Return error number. */ int read_drive(struct drive *drive, void *buf, size_t length, off_t offset) @@ -282,19 +281,7 @@ read_drive(struct drive *drive, void *buf, size_t length, off_t offset) count = min((unsigned) (drive->blocksize - blockoff), /* amount to transfer in this block */ uio.uio_resid); - if (drive->vp->v_lastr + bscale == blocknum) { /* did our last read finish in this block? */ - nextbn = blocknum + bscale; /* note the end of the transfer */ - error = breadn(drive->vp, /* and read with read-ahead */ - blocknum, - (int) drive->blocksize, - &nextbn, - (int *) &drive->blocksize, - 1, - NOCRED, - &bp); - } else /* random read: just read this block */ - error = bread(drive->vp, blocknum, (int) drive->blocksize, NOCRED, &bp); - drive->vp->v_lastr = blocknum; /* note the last block we read */ + error = bread(drive->vp, blocknum, (int) drive->blocksize, NOCRED, &bp); count = min(count, drive->blocksize - bp->b_resid); if (error) { brelse(bp); |