Support defragmentation for extX filesystem inodes
Reviewed-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
---
fs/ext4/super.c | 8 ++++++++
1 file changed, 8 insertions(+)
Index: linux-2.6/fs/ext4/super.c
===================================================================
--- linux-2.6.orig/fs/ext4/super.c 2008-05-07 21:23:41.961409593 -0700
+++ linux-2.6/fs/ext4/super.c 2008-05-07 21:27:18.215159859 -0700
@@ -599,6 +599,12 @@ static void init_once(struct kmem_cache
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",
@@ -608,6 +614,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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
| Linus Torvalds | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Tony Lindgren | [PATCH 37/90] ARM: OMAP: MPUIO wake updates |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Miklos Szeredi | -rt doesn't compile for UML |
git: | |
| Florian Weimer | Re: Handling large files with GIT |
| Dana How | [PATCH] Prevent megablobs from gunking up git packs |
| Denis Bueno | Recovering from repository corruption |
| Peter Stahlir | Git as a filesystem |
| Richard Stallman | Real men don't attack straw men |
| Brian A. Seklecki | sshd_config(5) PermitRootLogin yes |
| Theo de Raadt | Re: dmesg IBM x3650 OpenBSD 4.3 |
| Stuart Henderson | Re: Actual BIND error - Patching OpenBSD 4.3 named ? |
| Auke Kok | [PATCH 5/6] e1000: Secondary unicast address support |
| Jon Nelson | tg3: strange errors and non-working-ness |
| Indan Zupancic | Re: Realtek 8111C transmit timed out |
| Brandeburg, Jesse | RE: 2.6.24 BUG: soft lockup - CPU#X |
| Shared swap partition | 9 minutes ago | Linux general |
| usb mic not detected | 4 hours ago | Applications and Utilities |
| Problem in Inserting a module | 5 hours ago | Linux kernel |
| Treason Uncloaked | 10 hours ago | Linux kernel |
| high memory | 2 days ago | Linux kernel |
| semaphore access speed | 2 days ago | Applications and Utilities |
| the kernel how to power off the machine | 2 days ago | Linux kernel |
| Easter Eggs in windows XP | 3 days ago | Windows |
| Root password | 3 days ago | Linux general |
| Where/when DNOTIFY is used? | 3 days ago | Linux kernel |
