Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54601
b: refs/heads/master
c: c6a632a
h: refs/heads/master
i:
  54599: 2a30d43
v: v3
  • Loading branch information
Nick Piggin authored and Linus Torvalds committed May 8, 2007
1 parent c72fc8f commit 3735424
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e97cb3e28ce2fdd3b06a65f67d00462d86929008
refs/heads/master: c6a632a2b610c1bc123f1d258d688e8fe5cc70dd
6 changes: 3 additions & 3 deletions trunk/block/as-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) */
Expand All @@ -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;
Expand Down

0 comments on commit 3735424

Please sign in to comment.