diff options
| author | Hirofumi Ogawa <hirofumi@mail.parknet.co.jp> | 2004-10-19 18:15:30 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-10-19 18:15:30 -0700 |
| commit | 7ff228f05f3949cce5ce7d5258b5c87b48af0cb8 (patch) | |
| tree | 648a8c2778ea6d223f969538ae000a113252af42 /include | |
| parent | ec1528b041d7b412c646a51f4ca47f9223cd664d (diff) | |
[PATCH] FAT: the inode hash from per module to per sb
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/msdos_fs.h | 1 | ||||
| -rw-r--r-- | include/linux/msdos_fs_sb.h | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index d1f429b41d4c..4edc5dee1cb0 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h @@ -259,7 +259,6 @@ extern int fat_get_block(struct inode *inode, sector_t iblock, extern 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); diff --git a/include/linux/msdos_fs_sb.h b/include/linux/msdos_fs_sb.h index a94d990c7fb3..3310996efbcc 100644 --- a/include/linux/msdos_fs_sb.h +++ b/include/linux/msdos_fs_sb.h @@ -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 |
