getting a disk structure given a device name

Pokala, Ravi rpokala at panasas.com
Thu Jul 30 15:22:32 UTC 2015


>Date: Wed, 29 Jul 2015 23:31:03 +0000
>From: Raviprakash Darbha <rdarbha at juniper.net>
>To: "freebsd-hackers at freebsd.org" <freebsd-hackers at freebsd.org>
>Cc: Steve Kiernan <stevek at juniper.net>, Simon Gerraty
>	<sjg at juniper.net>
>Subject: getting a disk structure given a device name
>Message-ID: <F8ED1BDC-D8DA-458B-A652-B125183F27CB at juniper.net>
>Content-Type: text/plain; charset="us-ascii"
>
>Hello All 
>
>I am trying to write a filter driver for the ata block on freebsd 6.2 to
>simulate failed reads and writes.

We originally did something like that at Panasas, but by hacking ata(4)
and ad(4) directly. :-P Later on, we created a GEOM class to do error
injection. Currently, I prefer using the WRITE_UNCORRECTABLE48 command, to
tell the drive to actually return errors on subsequent reads. That has the
benefit of being indistinguishable from an actual read failure - the drive
spends the time to do error recovery, and sends the actual error code back.

-Ravi



More information about the freebsd-hackers mailing list