lkml.org 
[lkml]   [2007]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 19/23] FS: Socket inode defragmentation
    Support inode defragmentation for sockets

    Reviewed-by: Rik van Riel <riel@redhat.com>
    Signed-off-by: Christoph Lameter <clameter@sgi.com>
    ---
    net/socket.c | 8 ++++++++
    1 file changed, 8 insertions(+)

    Index: linux-2.6/net/socket.c
    ===================================================================
    --- linux-2.6.orig/net/socket.c 2007-10-30 16:34:39.000000000 -0700
    +++ linux-2.6/net/socket.c 2007-11-06 12:56:27.000000000 -0800
    @@ -265,6 +265,12 @@ static void init_once(struct kmem_cache
    inode_init_once(&ei->vfs_inode);
    }

    +static void *sock_get_inodes(struct kmem_cache *s, int nr, void **v)
    +{
    + return fs_get_inodes(s, nr, v,
    + offsetof(struct socket_alloc, vfs_inode));
    +}
    +
    static int init_inodecache(void)
    {
    sock_inode_cachep = kmem_cache_create("sock_inode_cache",
    @@ -276,6 +282,8 @@ static int init_inodecache(void)
    init_once);
    if (sock_inode_cachep == NULL)
    return -ENOMEM;
    + kmem_cache_setup_defrag(sock_inode_cachep,
    + sock_get_inodes, kick_inodes);
    return 0;
    }

    --
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-11-07 02:21    [W:0.022 / U:180.892 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site