Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Nov 2007 01:12:36 -0800
From:      Julian Elischer <julian@elischer.org>
To:        Dan Nelson <dnelson@allantgroup.com>
Cc:        Alan Cox <alc@cs.rice.edu>, FreeBSD Current <current@freebsd.org>
Subject:   Re: suggested ways of faking EIO?
Message-ID:  <4747EB04.3080009@elischer.org>
In-Reply-To: <20071124064711.GB4226@dan.emsphone.com>
References:  <4747A9B8.9080403@elischer.org> <20071124064711.GB4226@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4747EB04.3080009>