* call it with an offset based on blocks smaller than MAXBSIZE
* (implying that it should be named BSIZE, since it is clearly both a
* max and a min). */
- size = auio->afsio_resid; /* transfer size */
- fileBase = auio->afsio_offset; /* start file position for xfr */
+ size = auio->afsio_resid; /* transfer size */
+ fileBase = ((arw == UIO_READ) && (origLength < auio->uio_offset)) ?
+ origLength : auio->afsio_offset; /* start file position for xfr */
pageBase = fileBase & ~(MAXBSIZE - 1); /* file position of the page */
pageOffset = fileBase & (MAXBSIZE - 1); /* xfr start's offset within page */
tsize = MAXBSIZE - pageOffset; /* how much more fits in this page */