Messages in this thread Patch in this message | | | Date | Mon, 11 Aug 2008 08:06:33 -0700 | From | Christoph Lameter <> | Subject | [patch 17/19] Filesystem: Slab defrag: Reiserfs support |
| |
Slab defragmentation: Support reiserfs inode defragmentation.
Reviewed-by: Rik van Riel <riel@redhat.com> Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Christoph Lameter <cl@linux-foundation.org>
--- fs/reiserfs/super.c | 8 ++++++++ 1 file changed, 8 insertions(+)
Index: linux-next/fs/reiserfs/super.c =================================================================== --- linux-next.orig/fs/reiserfs/super.c 2008-08-11 07:42:11.712359126 -0700 +++ linux-next/fs/reiserfs/super.c 2008-08-11 07:47:05.122348709 -0700 @@ -533,6 +533,12 @@ static void init_once(void *foo) #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)); +} + static int init_inodecache(void) { reiserfs_inode_cachep = kmem_cache_create("reiser_inode_cache", @@ -543,6 +549,8 @@ static int init_inodecache(void) init_once); if (reiserfs_inode_cachep == NULL) return -ENOMEM; + kmem_cache_setup_defrag(reiserfs_inode_cachep, + reiserfs_get_inodes, kick_inodes); return 0; } --
| |