Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196831
b: refs/heads/master
c: 69b62d0
h: refs/heads/master
i:
  196829: 2c465b6
  196827: 3fa3730
  196823: 956ff74
  196815: 787accd
  196799: 7ab7562
v: v3
  • Loading branch information
Jens Axboe committed May 17, 2010
1 parent 29fb849 commit 2bdd173
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 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: 2395e463fefd4aa8b784787e926e9b84e216d14f
refs/heads/master: 69b62d01ec44fe0d505d89917392347732135a4d
14 changes: 12 additions & 2 deletions trunk/fs/fs-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,12 @@ static long wb_check_old_data_flush(struct bdi_writeback *wb)
unsigned long expired;
long nr_pages;

/*
* When set to zero, disable periodic writeback
*/
if (!dirty_writeback_interval)
return 0;

expired = wb->last_old_flush +
msecs_to_jiffies(dirty_writeback_interval * 10);
if (time_before(jiffies, expired))
Expand Down Expand Up @@ -947,8 +953,12 @@ int bdi_writeback_task(struct bdi_writeback *wb)
break;
}

wait_jiffies = msecs_to_jiffies(dirty_writeback_interval * 10);
schedule_timeout_interruptible(wait_jiffies);
if (dirty_writeback_interval) {
wait_jiffies = msecs_to_jiffies(dirty_writeback_interval * 10);
schedule_timeout_interruptible(wait_jiffies);
} else
schedule();

try_to_freeze();
}

Expand Down

0 comments on commit 2bdd173

Please sign in to comment.