From owner-freebsd-current@FreeBSD.ORG Sat Nov 24 09:12:44 2007 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D3A916A417 for ; Sat, 24 Nov 2007 09:12:44 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outC.internet-mail-service.net (outC.internet-mail-service.net [216.240.47.226]) by mx1.freebsd.org (Postfix) with ESMTP id F033313C455 for ; Sat, 24 Nov 2007 09:12:43 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Sat, 24 Nov 2007 01:12:37 -0800 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 5041F126AB0; Sat, 24 Nov 2007 01:12:37 -0800 (PST) Message-ID: <4747EB04.3080009@elischer.org> Date: Sat, 24 Nov 2007 01:12:36 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: Dan Nelson References: <4747A9B8.9080403@elischer.org> <20071124064711.GB4226@dan.emsphone.com> In-Reply-To: <20071124064711.GB4226@dan.emsphone.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alan Cox , FreeBSD Current Subject: Re: suggested ways of faking EIO? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Nov 2007 09:12:44 -0000 Dan Nelson wrote: > In the last episode (Nov 23), Julian Elischer said: >> I need to make physio make a request from disk, and have the request >> come back asynchronously with an EIO. >> >> I have tried just reading some distance past the end of a partition, >> but I'm not totally convinced that it acts exactly like as if I'd >> tried to read a bad sector. Since geom has been added, the legality >> of a read needs to be tested in the geometry layer, so I suppose it >> must come back asynchronously, as that is no longer directly executed >> through function calls but is it really the same as a disk failure? >> >> Anyone done this? or does anyone have a disk with a known bad sector >> I can try my test case on? :-) > > The geom NOP module can fail a given percentage of I/O with whatever > error number you choose. You could hack g_nop.c to make it fail on a > given sector instead. > great! that's the hint I'm looking for... (now to work out how to use it)