lkml.org 
[lkml]   [2005]   [Oct]   [7]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
/
DateFri, 7 Oct 2005 12:02:22 +0200
FromJens Axboe <>
SubjectRe: [RFC] Hard disk protection revisited
On Fri, Oct 07 2005, Jon Escombe wrote:
> I would like to submit the latest disk protection (a.k.a. parking and 
> freezing) code from the hdaps-devel side for comment, along with a brief 
> overview of what's in the patch -
> 
> During initialisation, disk drivers with 'protect' helper functions 
> (currently ide and libata) fill in two new function pointers in the 
> queue structure. A sysfs 'protect' queue attribute is then created in 
> the block layer for devices who's lower level drivers have registered 
> these helpers.
> 
> When a value (in seconds) is written to the protect attribute, the block 
> layer code calls the driver 'protect' helper function. This helper 
> parks/suspends the disk, and then stops the queue. Control then returns 
> to the block layer which re-uses the plugging timer to set an automatic 
> timeout to restart the queue. When 0 is written to the protect 
> attribute, or the timer expires, the queue is restarted using the 
> 'unprotect' helper function, and the plugging timer is restored.
> 
> This interface is intended to be used by a daemon process, that monitors 
> the hdaps driver output for excessive changes in acceleration, and keeps 
> the device parked and the queue stopped until the values become normal.
> 
> Patch applies to 2.6.14-rc3 (also 2.6.13.x), and requires libata_passthru..

I have to nack this one for now, I still want the generic command types
patch to go in first. We have far too many queue hooks already, adding
two more for a relatively obscure use such as this one is not a good
idea.

My suggestion is to maintain this patch out of tree for now, it will be
a few kernel release iterations before the command type patch is in.

-- 
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-10-07 08:04    [W:0.159 / U:0.530 seconds]
©2003-2008 Jasper Spaans