From owner-freebsd-current Tue May 18 5: 9:17 1999 Delivered-To: freebsd-current@freebsd.org Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.26.10.9]) by hub.freebsd.org (Postfix) with ESMTP id 0E8AD15676 for ; Tue, 18 May 1999 05:08:44 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id WAA12446; Tue, 18 May 1999 22:08:41 +1000 Date: Tue, 18 May 1999 22:08:41 +1000 From: Bruce Evans Message-Id: <199905181208.WAA12446@godzilla.zeta.org.au> To: green@unixhelp.org, sos@freebsd.dk Subject: Re: ATA and afd (LS-120): got it WORKING! Cc: current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >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 message