lkml.org 
[lkml]   [2015]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 22/45] writeback: make bdi_start_background_writeback() take bdi_writeback instead of backing_dev_info
    Date
    bdi_start_background_writeback() currently takes @bdi and kicks the
    root wb (bdi_writeback). In preparation for cgroup writeback support,
    make it take wb instead.

    This patch doesn't make any functional difference.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Jens Axboe <axboe@kernel.dk>
    Cc: Jan Kara <jack@suse.cz>
    ---
    fs/fs-writeback.c | 12 ++++++------
    include/linux/backing-dev.h | 2 +-
    mm/page-writeback.c | 4 ++--
    3 files changed, 9 insertions(+), 9 deletions(-)

    diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
    index 6ab113b..c209ff1 100644
    --- a/fs/fs-writeback.c
    +++ b/fs/fs-writeback.c
    @@ -244,23 +244,23 @@ void wb_start_writeback(struct bdi_writeback *wb, long nr_pages,
    }

    /**
    - * bdi_start_background_writeback - start background writeback
    - * @bdi: the backing device to write from
    + * wb_start_background_writeback - start background writeback
    + * @wb: bdi_writback to write from
    *
    * Description:
    * This makes sure WB_SYNC_NONE background writeback happens. When
    - * this function returns, it is only guaranteed that for given BDI
    + * this function returns, it is only guaranteed that for given wb
    * some IO is happening if we are over background dirty threshold.
    * Caller need not hold sb s_umount semaphore.
    */
    -void bdi_start_background_writeback(struct backing_dev_info *bdi)
    +void wb_start_background_writeback(struct bdi_writeback *wb)
    {
    /*
    * We just wake up the flusher thread. It will perform background
    * writeback as soon as there is no other work to do.
    */
    - trace_writeback_wake_background(bdi);
    - wb_wakeup(&bdi->wb);
    + trace_writeback_wake_background(wb->bdi);
    + wb_wakeup(wb);
    }

    /**
    diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h
    index 953fa01..4cdab7c 100644
    --- a/include/linux/backing-dev.h
    +++ b/include/linux/backing-dev.h
    @@ -28,7 +28,7 @@ void bdi_unregister(struct backing_dev_info *bdi);
    int __must_check bdi_setup_and_register(struct backing_dev_info *, char *, unsigned int);
    void wb_start_writeback(struct bdi_writeback *wb, long nr_pages,
    bool range_cyclic, enum wb_reason reason);
    -void bdi_start_background_writeback(struct backing_dev_info *bdi);
    +void wb_start_background_writeback(struct bdi_writeback *wb);
    void wb_workfn(struct work_struct *work);
    void wb_wakeup_delayed(struct bdi_writeback *wb);

    diff --git a/mm/page-writeback.c b/mm/page-writeback.c
    index b250ee2..4cf365c 100644
    --- a/mm/page-writeback.c
    +++ b/mm/page-writeback.c
    @@ -1450,7 +1450,7 @@ static void balance_dirty_pages(struct address_space *mapping,
    }

    if (unlikely(!writeback_in_progress(wb)))
    - bdi_start_background_writeback(bdi);
    + wb_start_background_writeback(wb);

    if (!strictlimit)
    wb_dirty_limits(wb, dirty_thresh, background_thresh,
    @@ -1583,7 +1583,7 @@ pause:
    return;

    if (nr_reclaimable > background_thresh)
    - bdi_start_background_writeback(bdi);
    + wb_start_background_writeback(wb);
    }

    static DEFINE_PER_CPU(int, bdp_ratelimits);
    --
    2.1.0


    \
     
     \ /
      Last update: 2015-01-06 22:41    [W:4.294 / U:0.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site