Support defragmentation for extX filesystem inodes Reviewed-by: Rik van Riel <riel@xxxxxxxxxx> Signed-off-by: Christoph Lameter <clameter@xxxxxxx> Signed-off-by: Christoph Lameter <cl@xxxxxxxxxxxxxxxxxxxx> --- fs/ext4/super.c | 8 ++++++++ 1 file changed, 8 insertions(+) Index: linux-next/fs/ext4/super.c =================================================================== --- linux-next.orig/fs/ext4/super.c 2008-08-11 07:42:10.412359410 -0700 +++ linux-next/fs/ext4/super.c 2008-08-11 07:47:05.062348866 -0700 @@ -605,6 +605,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", @@ -614,6 +620,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-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html