Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754978Ab0A2UvQ (ORCPT ); Fri, 29 Jan 2010 15:51:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754549Ab0A2UvM (ORCPT ); Fri, 29 Jan 2010 15:51:12 -0500 Received: from nlpi157.sbcis.sbc.com ([207.115.36.171]:42642 "EHLO nlpi157.prodigy.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753454Ab0A2UvL (ORCPT ); Fri, 29 Jan 2010 15:51:11 -0500 Message-Id: <20100129205006.083300007@quilx.com> References: <20100129204931.789743493@quilx.com> User-Agent: quilt/0.46-1 Date: Fri, 29 Jan 2010 14:49:45 -0600 From: Christoph Lameter To: Andi Kleen Cc: Dave Chinner , Christoph Lameter Cc: Rik van Riel Cc: Pekka Enberg Cc: akpm@linux-foundation.org Cc: Miklos Szeredi Cc: Nick Piggin Cc: Hugh Dickins Cc: linux-kernel@vger.kernel.org Subject: Filesystem: Ext4 filesystem defrag Content-Disposition: inline; filename=ext4-defrag Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1340 Lines: 43 Support defragmentation for extX filesystem inodes Reviewed-by: Rik van Riel Signed-off-by: Christoph Lameter Signed-off-by: Christoph Lameter --- fs/ext4/super.c | 8 ++++++++ 1 file changed, 8 insertions(+) Index: slab-2.6/fs/ext4/super.c =================================================================== --- slab-2.6.orig/fs/ext4/super.c 2010-01-22 15:09:43.000000000 -0600 +++ slab-2.6/fs/ext4/super.c 2010-01-22 16:21:07.000000000 -0600 @@ -741,6 +741,12 @@ static void init_once(void *foo) inode_init_once(&ei->vfs_inode); } +static void *ext4_get_inodes(struct kmem_cache *s, int nr, void **v) +{ + return fs_get_inodes(s, nr, v, + offsetof(struct ext4_inode_info, vfs_inode)); +} + static int init_inodecache(void) { ext4_inode_cachep = kmem_cache_create("ext4_inode_cache", @@ -750,6 +756,8 @@ static int init_inodecache(void) init_once); if (ext4_inode_cachep == NULL) return -ENOMEM; + kmem_cache_setup_defrag(ext4_inode_cachep, + ext4_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/