Re: is there any Hard-disk shock-protection for 2.6.18 and above?

Pavel Machek
2006-12-02T11:58:17Z

Hi!

> >> 1. Adds functions to ide-disk.c and scsi_lib.c that issue an idle
> >> immediate with head unload or a standby immediate command as
> >> appropriate and stop the queue on command completion.
> >
> > Can we get short Documentation/ patch?
>
> Sure. Would Documentation/block/disk-protection.txt be an appropriate
> location?

Yes.

> >> +module_param_named(protect_method, libata_protect_method, int, 0444);
> >> +MODULE_PARM_DESC(protect_method, "hdaps disk protection method (0=autodetect, 1=unload, 2=standby)");
> >
> > Should this be configurable by module parameter? Why not tell each
> > unload what to do?
>
> As I understand, ATA specs expect drives to indicate whether they
> support the head unload feature of the idle immediate command or not.
> Unfortunately, a whole lot of them doesn't, well, mine doesn't anyway.
> Since I know that my drive does actually support head unloading, I'd
> like to tell the module so in order to prevent it from falling back to
> standby immediate. Applications that issue disk parking requests
> should not be bothered with this issue, in my opinion.

What if you have two disks and one supports head unload and second
does not?

> > Is /sys interface right thing to do?
>
> Probably, you're right here. Since this feature is actually drive
> specific, it should not really be set globally as a libata or ide-disk
> parameter but specifically for each drive connected. Perhaps we should
> add another attribute to /sys/block/*/queue or enhance the scope of
> /sys/block/*/queue/protect?

Certainly better than current solution. Or maybe ioctl similar to wat
hdparm uses?
Pavel
--
Thanks for all the (sleeping) penguins.