Add inode defrag support Signed-off-by: Christoph Lameter --- fs/reiserfs/super.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) Index: slub/fs/reiserfs/super.c =================================================================== --- slub.orig/fs/reiserfs/super.c 2007-06-07 14:09:36.000000000 -0700 +++ slub/fs/reiserfs/super.c 2007-06-07 14:30:49.000000000 -0700 @@ -520,6 +520,17 @@ static void init_once(void *foo, struct #endif } +static void *reiserfs_get_inodes(struct kmem_cache *s, int nr, void **v) +{ + return fs_get_inodes(s, nr, v, + offsetof(struct reiserfs_inode_info, vfs_inode)); +} + +struct kmem_cache_ops reiserfs_kmem_cache_ops = { + .get = reiserfs_get_inodes, + .kick = kick_inodes +}; + static int init_inodecache(void) { reiserfs_inode_cachep = kmem_cache_create("reiser_inode_cache", @@ -527,7 +538,8 @@ static int init_inodecache(void) reiserfs_inode_info), 0, (SLAB_RECLAIM_ACCOUNT| SLAB_MEM_SPREAD), - init_once, NULL); + init_once, + &reiserfs_kmem_cache_ops); if (reiserfs_inode_cachep == NULL) return -ENOMEM; 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/