lkml.org 
[lkml]   [2010]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 13/14] fs,btrfs: Allow kswapd to writeback pages
    Date
    As only kswapd and memcg are writing back pages, there should be no
    danger of overflowing the stack. Allow the writing back of dirty pages
    in btrfs from the VM.

    Signed-off-by: Mel Gorman <mel@csn.ul.ie>
    ---
    fs/btrfs/disk-io.c | 21 +--------------------
    1 files changed, 1 insertions(+), 20 deletions(-)

    diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
    index 34f7c37..e4aa547 100644
    --- a/fs/btrfs/disk-io.c
    +++ b/fs/btrfs/disk-io.c
    @@ -696,26 +696,7 @@ static int btree_writepage(struct page *page, struct writeback_control *wbc)
    int was_dirty;

    tree = &BTRFS_I(page->mapping->host)->io_tree;
    - if (!(current->flags & PF_MEMALLOC)) {
    - return extent_write_full_page(tree, page,
    - btree_get_extent, wbc);
    - }
    -
    - redirty_page_for_writepage(wbc, page);
    - eb = btrfs_find_tree_block(root, page_offset(page),
    - PAGE_CACHE_SIZE);
    - WARN_ON(!eb);
    -
    - was_dirty = test_and_set_bit(EXTENT_BUFFER_DIRTY, &eb->bflags);
    - if (!was_dirty) {
    - spin_lock(&root->fs_info->delalloc_lock);
    - root->fs_info->dirty_metadata_bytes += PAGE_CACHE_SIZE;
    - spin_unlock(&root->fs_info->delalloc_lock);
    - }
    - free_extent_buffer(eb);
    -
    - unlock_page(page);
    - return 0;
    + return extent_write_full_page(tree, page, btree_get_extent, wbc);
    }

    static int btree_writepages(struct address_space *mapping,
    --
    1.7.1


    \
     
     \ /
      Last update: 2010-06-29 13:39    [W:0.021 / U:30.848 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site