Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200619
b: refs/heads/master
c: b8c2f34
h: refs/heads/master
i:
  200617: 1fea17d
  200615: 1f76b38
v: v3
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Jun 11, 2010
1 parent ed262bb commit e854ff2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 22 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: d19de7edf59cdd586777b009e0e8fbe5412dd35f
refs/heads/master: b8c2f3474f1077599ec6e90c2f263f17055cc3d8
32 changes: 11 additions & 21 deletions trunk/fs/fs-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,42 +920,32 @@ int bdi_writeback_task(struct bdi_writeback *wb)
}

/*
* Schedule writeback for all backing devices. This does WB_SYNC_NONE
* writeback, for integrity writeback see bdi_queue_work_onstack().
* Start writeback of `nr_pages' pages. If `nr_pages' is zero, write back
* the whole world.
*/
static void bdi_writeback_all(struct super_block *sb, long nr_pages)
void wakeup_flusher_threads(long nr_pages)
{
struct backing_dev_info *bdi;
struct wb_writeback_args args = {
.sb = sb,
.nr_pages = nr_pages,
.sync_mode = WB_SYNC_NONE,
};
struct backing_dev_info *bdi;

rcu_read_lock();
if (nr_pages) {
args.nr_pages = nr_pages;
} else {
args.nr_pages = global_page_state(NR_FILE_DIRTY) +
global_page_state(NR_UNSTABLE_NFS);
}

rcu_read_lock();
list_for_each_entry_rcu(bdi, &bdi_list, bdi_list) {
if (!bdi_has_dirty_io(bdi))
continue;

bdi_alloc_queue_work(bdi, &args);
}

rcu_read_unlock();
}

/*
* Start writeback of `nr_pages' pages. If `nr_pages' is zero, write back
* the whole world.
*/
void wakeup_flusher_threads(long nr_pages)
{
if (nr_pages == 0)
nr_pages = global_page_state(NR_FILE_DIRTY) +
global_page_state(NR_UNSTABLE_NFS);
bdi_writeback_all(NULL, nr_pages);
}

static noinline void block_dump___mark_inode_dirty(struct inode *inode)
{
if (inode->i_ino || strcmp(inode->i_sb->s_id, "bdev")) {
Expand Down

0 comments on commit e854ff2

Please sign in to comment.