From bf06e6535f7e00a3711978fa7835a3394b82b547 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Tue, 14 Apr 2015 22:37:31 +0200 Subject: ext2fs: use fat nodes Use `diskfs_make_node_alloc' to allocate both the node and the disknode in a continuous chunk of memory. This increases locality and reduces the pressure on the memory allocator. * ext2fs/inode.c: Use `diskfs_node_disknode' to access the disknode. (diskfs_cached_lookup): Use `diskfs_make_node_alloc' to allocate the node. (diskfs_node_norefs): Only free `np'. * ext2fs/dir.c: Use `diskfs_node_disknode' to access the disknode. * ext2fs/ext2fs.h: Likewise. * ext2fs/getblk.c: Likewise. * ext2fs/ialloc.c: Likewise. * ext2fs/pager.c: Likewise. * ext2fs/truncate.c: Likewise. --- ext2fs/ext2fs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext2fs/ext2fs.h') diff --git a/ext2fs/ext2fs.h b/ext2fs/ext2fs.h index 3422af2f..9667b6f6 100644 --- a/ext2fs/ext2fs.h +++ b/ext2fs/ext2fs.h @@ -503,7 +503,7 @@ record_indir_poke (struct node *node, void *ptr) ext2_debug ("(%llu, %p)", node->cache_id, ptr); assert (disk_cache_block_is_ref (block)); global_block_modified (block); - pokel_add (&node->dn->indir_pokel, block_ptr, block_size); + pokel_add (&diskfs_node_disknode (node)->indir_pokel, block_ptr, block_size); } /* ---------------------------------------------------------------- */ @@ -524,7 +524,7 @@ alloc_sync (struct node *np) if (np) { diskfs_node_update (np, 1); - pokel_sync (&np->dn->indir_pokel, 1); + pokel_sync (&diskfs_node_disknode (np)->indir_pokel, 1); } diskfs_set_hypermetadata (1, 0); } -- cgit v1.2.3