From owner-freebsd-arch Wed Jan 16 11: 9:23 2002 Delivered-To: freebsd-arch@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id AAF8937B419; Wed, 16 Jan 2002 11:09:19 -0800 (PST) Received: by elvis.mu.org (Postfix, from userid 1192) id 8022310DE06; Wed, 16 Jan 2002 11:09:19 -0800 (PST) Date: Wed, 16 Jan 2002 11:09:19 -0800 From: Alfred Perlstein To: Dan Moschuk Cc: Poul-Henning Kamp , arch@FreeBSD.ORG Subject: Re: M_SHORTWAIT, the md driver and errno Message-ID: <20020116110919.D26067@elvis.mu.org> References: <20020116012950.C7831@spirit.jaded.net> <43818.1011165127@critter.freebsd.dk> <20020116114805.L7831@spirit.jaded.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020116114805.L7831@spirit.jaded.net>; from dan@FreeBSD.ORG on Wed, Jan 16, 2002 at 11:48:05AM -0500 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Dan Moschuk [020116 08:48] wrote: > > | >I'm fixing up the md driver to use the M_SHORTWAIT flag when allocating > | >memory. In the event that our request times out, what errno should the > | >driver return? > | > | Good question, I guess EIO is the "make sure not to break anything" > | choice, but obviously ENOMEM would make more sense. > > ENOMEM would make the most sense, I just wasn't sure you were "allowed" to > return that for write calls. > > EIO kind of sucks; seeing an "Input/output error" while writing to a > memory disk will probably result in people incorrectly thinking that they > have bad ram. I think EIO is probably more correct with a rate limited console message explaining what happened. Also, I think that the timeout should be configurable and users should have the option to turn it off. I also think that the timeout should be relatively long, on the order of 30 seconds at least. -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message