Re: [PATCH] 2.5.13 IDE 50

From: Tim Schmielau (
Date: Fri May 03 2002 - 13:12:42 EST

> - Fix wrong usage of time_after in ide.c. This should cure the drive
> seek
> timeout problems some people where expierencing. This was clarified
> to me by
> Bartek, who apparently checked whatever the actual code is consistent
> with the comments in front of it. Thank you Bartlomiej Zolnierkiewicz.
> I think now that we should have time_past(xxx) in <linux/timer.h>.

What would you suppose time_past(xxx) to do?

I agree this calls for some action to prevent confusion in the future.
However, I'm not sure how a new macro could help here.

Andreas Dilger once did a patch to clarify the documentation of
time_[before,after] a bit.

> @@ -1258,7 +1172,7 @@
> /* This device still wants to remain idle.
> */
> - if (drive->sleep && time_after(jiffies, drive->sleep))
> + if (drive->sleep && time_after(drive->sleep, jiffies))
> continue;
> /* Take this device, if there is no device choosen thus

I think there is an implicit notational convention to have the volatile
argument, i.e. jiffies, first. This would express that the condition
evaluates as true *before* some fixed point in time:

   if (drive->sleep && time_before(jiffies, drive->sleep))

Maybe sticking to this convention would suffice to keep the
semantics of the condition obvious.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Tue May 07 2002 - 22:00:20 EST