two ata write chaching request

Alexander Motin mav at FreeBSD.org
Tue Dec 21 07:07:14 UTC 2010


Xin LI wrote:
> On 12/20/10 15:10, Alexander Best wrote:
>> i'd really like to see
> 
>> 1) write caching to be turned on and off for individual hdds
>>    (i.e. hw.ata.X.wc) and
> 
> This is possible.  We may need to split the logic out from ad_init() as
> the disk number is not known at that point if I understood the code
> correctly.

ad_init() receives newbus device as an argument, so it does have the
disk number.

>> 2) to be able to turn write chaching on and off on the fly.
> 
> If I understand the code correctly, this is merely issuing a SETFEATURE
> at runtime and *should* be possible.  The problem is atacontrol(8) does
> not offer a way to issue the command directly as camcontrol(8) do.
> 
>> any thoughts on these two topics? is it technically possible?

It is possible, but I would recommend you to focus on CAM-based ATA. As
first step you can easily execute SETFEATURE command just from
camcontrol tool. As second, it could be added to adastart()/adadone() to
be executed on each device attach/reset, same as in ad_init().

-- 
Alexander Motin


More information about the freebsd-current mailing list