Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c6a632a2b610c1bc123f1d258d688e8fe5cc70dd
Commit:     c6a632a2b610c1bc123f1d258d688e8fe5cc70dd
Parent:     e97cb3e28ce2fdd3b06a65f67d00462d86929008
Author:     Nick Piggin <[EMAIL PROTECTED]>
AuthorDate: Tue May 8 00:26:34 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue May 8 11:15:03 2007 -0700

    as: fix antic_expire check
    
    Fix units mismatch (jiffies vs msecs) in as-iosched.c, spotted by Xiaoning
    Ding <[EMAIL PROTECTED]>.
    
    Signed-off-by: Nick Piggin <[EMAIL PROTECTED]>
    Cc: Jens Axboe <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 block/as-iosched.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/block/as-iosched.c b/block/as-iosched.c
index ef12627..640aa83 100644
--- a/block/as-iosched.c
+++ b/block/as-iosched.c
@@ -569,7 +569,7 @@ static void as_update_iohist(struct as_data *ad, struct 
as_io_context *aic,
 static int as_close_req(struct as_data *ad, struct as_io_context *aic,
                        struct request *rq)
 {
-       unsigned long delay;    /* milliseconds */
+       unsigned long delay;    /* jiffies */
        sector_t last = ad->last_sector[ad->batch_data_dir];
        sector_t next = rq->sector;
        sector_t delta; /* acceptable close offset (in sectors) */
@@ -578,11 +578,11 @@ static int as_close_req(struct as_data *ad, struct 
as_io_context *aic,
        if (ad->antic_status == ANTIC_OFF || !ad->ioc_finished)
                delay = 0;
        else
-               delay = ((jiffies - ad->antic_start) * 1000) / HZ;
+               delay = jiffies - ad->antic_start;
 
        if (delay == 0)
                delta = 8192;
-       else if (delay <= 20 && delay <= ad->antic_expire)
+       else if (delay <= (20 * HZ / 1000) && delay <= ad->antic_expire)
                delta = 8192 << delay;
        else
                return 1;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to