Date: Tue, 18 May 1999 22:08:41 +1000 From: Bruce Evans <bde@zeta.org.au> To: green@unixhelp.org, sos@freebsd.dk Cc: current@FreeBSD.ORG Subject: Re: ATA and afd (LS-120): got it WORKING! Message-ID: <199905181208.WAA12446@godzilla.zeta.org.au>
index | next in thread | raw e-mail
>I know I cut off the transfer length, but I also return the missing >size in b_resid, so the kernel _should_ come back with the rest of >the transfer in a new request or at least fail on the unsatisfied >request, and on my system it does seem to work... >If this doesn't work in all cases, some other part of the kernel is >broken IMHO. I thought of minphys once, but that seems not to work >anymore either... Using a driver-specific minphys is the correct method for unbuffered i/o, especially for tapes. This was recently made harder to use by replacing the specialised driver read/write routines by general ones (physread/physwrite). minphys and b_resid don't work for buffered i/o. vfs_bio.c doesn't even look at b_resid, so short i/o's are considered to have been complete. This is not much of a problem, because buffered i/o's are limited to MAXBSIZE (64K), and filesystems shouldn't have partial fs-blocks at the end of a disk. Buffered i/o's larger than MAXBSIZE can only occur for clustered i/o's if the driver supports them. E.g., the wd driver can easily transfer 255 sectors and it sets d_maxio to 248 so that clusters up to size 124K get created. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the messagehome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199905181208.WAA12446>
