From owner-freebsd-hackers Mon Jan 11 15:10:55 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA16267 for freebsd-hackers-outgoing; Mon, 11 Jan 1999 15:10:55 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from feral-gw.feral.com (feral.com [192.67.166.1]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA16262 for ; Mon, 11 Jan 1999 15:10:53 -0800 (PST) (envelope-from mjacob@feral.com) Received: from localhost (mjacob@localhost) by feral-gw.feral.com (8.8.7/8.8.7) with ESMTP id PAA20161; Mon, 11 Jan 1999 15:10:14 -0800 Date: Mon, 11 Jan 1999 15:10:14 -0800 (PST) From: Matthew Jacob X-Sender: mjacob@feral-gw Reply-To: mjacob@feral.com To: Julian Elischer cc: freebsd-hackers@FreeBSD.ORG Subject: Re: what is the meaning of this useless code? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 11 Jan 1999, Julian Elischer wrote: > > > On Mon, 11 Jan 1999, Matthew Jacob wrote: > > > > > if (resid > maxio) > > resid = maxio; > > > > return getpbuf(); > > } > > > > > > why is resid being truyncaated and maxio being set when this has no > > effect? > > I think resid was originally an agument to getpbuf > but mechanical edits have turned it all into a NOP. > Good catch.. Okay. > > However there is a related problem.. > > the maximum IO size allowed for a device is kept in the > cdevsw entry, which is the WRONG place, because > it cannot correctly reflect the case when there are two differnt devices > with different limits on the same controller (e.g. two different drives > or even two differend controllers on one driver). > Well, there are a number of limits- some are device specific, some are bus specific and some are VM/OS specific. It's a bit confusing which applies here. I'm going to ponder this as time permits. I'm trying to track down a hang on alpha with larget I/Os and this led me to try and follow the raw I/O path which led to this... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message