Re: [PATCH 2/4] libata: Implement disk shock protection support

From: Valdis . Kletnieks
Date: Thu Sep 11 2008 - 14:30:00 EST


On Thu, 11 Sep 2008 15:01:00 +0200, Tejun Heo said:
> Ah.. just one more thing.
>
> I think it would be easier on the application if the written timeout
> value is cropped if it's over the maximum instead of failing the
> write.

Which is better, failing the write so the application *knows* there is a
problem, or letting the application proceed with a totally incorrect idea of
what the value is set to?

For instance, what happens if the program tries to set 100, it's silently
clamped to 10, and it then tries to set a timer for itself to '90% of the
value'? It might be in for an unpleasant surprise when it finds out that
it's overshot by 81....


Attachment: pgp00000.pgp
Description: PGP signature