login
Header Space

 
 

[patch 17/19] Filesystem: Slab defrag: Reiserfs support

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Pekka Enberg <penberg@...>
Cc: <akpm@...>, Christoph Lameter <clameter@...>, Christoph Lameter <cl@...>, <linux-kernel@...>, <linux-fsdevel@...>, Mel Gorman <mel@...>, <andi@...>, Rik van Riel <riel@...>, <mpm@...>, Dave Chinner <david@...>
Date: Friday, May 9, 2008 - 10:21 pm

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 files changed, 8 insertions(+), 0 deletions(-)

Index: linux-2.6/fs/reiserfs/super.c
===================================================================
--- linux-2.6.orig/fs/reiserfs/super.c	2008-07-31 12:18:12.000000000 -0500
+++ linux-2.6/fs/reiserfs/super.c	2008-07-31 12:18:15.000000000 -0500
@@ -533,6 +533,12 @@
 #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 @@
 						  init_once);
 	if (reiserfs_inode_cachep == NULL)
 		return -ENOMEM;
+	kmem_cache_setup_defrag(reiserfs_inode_cachep,
+			reiserfs_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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
per_cpu_counter_sum lockdep warning, Balbir Singh, (Tue Jun 3, 11:27 pm)
[patch 17/19] Filesystem: Slab defrag: Reiserfs support, Christoph Lameter, (Fri May 9, 10:21 pm)
Re: per_cpu_counter_sum lockdep warning, Matthew Wilcox, (Tue Jun 3, 11:59 pm)
Re: per_cpu_counter_sum lockdep warning, Balbir Singh, (Wed Jun 4, 12:56 am)
Re: per_cpu_counter_sum lockdep warning, Balbir Singh, (Wed Jun 4, 12:43 am)
speck-geostationary