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

From: Pavel Machek
Date: Sat Dec 02 2006 - 06:58:34 EST


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