lkml.org 
[lkml]   [2009]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [RFC] page-writeback: move indoes from one superblock together
    > > Could just reuse inode.
    > oops, forgot to remove it when moveing inode to global.

    This is the one I merged. I added the below as wel, we don't need to
    reiterate the list if we only moved inodes from a single super block.

    diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
    index b27406d..225c731 100644
    --- a/fs/fs-writeback.c
    +++ b/fs/fs-writeback.c
    @@ -336,17 +336,27 @@ static void move_expired_inodes(struct list_head *delaying_queue,
    {
    LIST_HEAD(tmp);
    struct list_head *pos, *node;
    - struct super_block *sb;
    + struct super_block *sb = NULL;
    struct inode *inode;
    + int do_sb_sort = 0;

    while (!list_empty(delaying_queue)) {
    inode = list_entry(delaying_queue->prev, struct inode, i_list);
    if (older_than_this &&
    inode_dirtied_after(inode, *older_than_this))
    break;
    + if (sb && sb != inode->i_sb)
    + do_sb_sort = 1;
    + sb = inode->i_sb;
    list_move(&inode->i_list, &tmp);
    }

    + /* just one sb in list, splice to dispatch_queue and we're done */
    + if (!do_sb_sort) {
    + list_splice(&tmp, dispatch_queue);
    + return;
    + }
    +
    /* Move inodes from one superblock together */
    while (!list_empty(&tmp)) {
    inode = list_entry(tmp.prev, struct inode, i_list);
    --
    Jens Axboe



    \
     
     \ /
      Last update: 2009-09-24 15:19    [W:5.178 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site