FAT: the inode hash from per module to per sb (4/4)
OGAWA Hirofumi
maintainerPATCH 1/1 FAT: the inode hash from per module to per sb (4/4)
Signed-off-by OGAWA Hirofumi <[email protected]>
---
fs/fat/fatfs_syms.c | 2 - fs/fat/inode.c | 57 +++++++++++++++++++++++--------------------- include/linux/msdos_fs.h | 1 include/linux/msdos_fs_sb.h | 7 +++++ 4 files changed, 39 insertions(+), 28 deletions(-)
fs/fat/fatfs_syms.c renamed from fs/fat/fatfs_syms.c~fat_per-sb-inodehash +1 -1
@@ -40,7 +40,7 @@ void __exit fat_destroy_inodecache(void)static int __init init_fat_fs (void ) {int ret; -fat_hash_init (); + ret =fat_cache_init ();if (ret <0 )return ret;
fs/fat/inode.c renamed from fs/fat/inode.c~fat_per-sb-inodehash +31 -26
145 lines not on this page · raw message
include/linux/msdos_fs.h renamed from include/linux/msdos_fs.h~fat_per-sb-inodehash +0 -1
@@ -262,7 +262,6 @@ extern int fat_get_block(struct inode *iextern void fat_truncate (struct inode *inode);/* fat/inode.c */ -extern void fat_hash_init (void );extern void fat_attach (struct inode *inode,loff_t i_pos);extern void fat_detach (struct inode *inode);extern struct inode *fat_iget (struct super_block *sb,loff_t i_pos);
include/linux/msdos_fs_sb.h renamed from include/linux/msdos_fs_sb.h~fat_per-sb-inodehash +7 -0
@@ -26,6 +26,10 @@ struct fat_mount_options { nocase:1 ;/* Does this need case conversion? 0=need case conversion*/ }; +#define FAT_HASH_BITS 8 +#define FAT_HASH_SIZE (1UL << FAT_HASH_BITS) +#define FAT_HASH_MASK (FAT_HASH_SIZE-1) +struct msdos_sb_info {unsigned short sec_per_clus;/* sectors/cluster */ unsigned short cluster_bits;/* log2(cluster_size) */
@@ -48,6 +52,9 @@ struct msdos_sb_info {void *dir_ops;/* Opaque; default directory operations */ int dir_per_block;/* dir entries per block */ int dir_per_block_bits;/* log2(dir_per_block) */ + +spinlock_t inode_hash_lock; + struct hlist_head inode_hashtable[FAT_HASH_SIZE]; };#endif
_
Signature · 1 line
OGAWA Hirofumi <[email protected]>