[PATCH 13/17] fat: Use own optional list for metadata bhs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jan Kara <jack@xxxxxxx>
---
 fs/fat/fat.h   | 2 ++
 fs/fat/inode.c | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/fs/fat/fat.h b/fs/fat/fat.h
index 7c31f4bc74a9..eef6998f8bf7 100644
--- a/fs/fat/fat.h
+++ b/fs/fat/fat.h
@@ -127,6 +127,8 @@ struct msdos_inode_info {
 	struct hlist_node i_fat_hash;	/* hash by i_location */
 	struct hlist_node i_dir_hash;	/* hash by i_logstart */
 	struct rw_semaphore truncate_lock; /* protect bmap against truncate */
+	struct inode_meta_bhs i_mbh;	/* list of metadata buffers associated
+					   with this inode */
 	struct inode vfs_inode;
 };
 
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 854b578f6695..ba9e662561fc 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -38,6 +38,10 @@
 static int fat_default_codepage = CONFIG_FAT_DEFAULT_CODEPAGE;
 static char fat_default_iocharset[] = CONFIG_FAT_DEFAULT_IOCHARSET;
 
+static int fat_inode_fields[IF_FIELD_NR] = {
+	[IF_META_BHS] = (int)offsetof(struct msdos_inode_info, i_mbh) -
+			(int)offsetof(struct msdos_inode_info, vfs_inode),
+};
 
 static int fat_add_cluster(struct inode *inode)
 {
@@ -604,6 +608,7 @@ static void init_once(void *foo)
 	INIT_LIST_HEAD(&ei->cache_lru);
 	INIT_HLIST_NODE(&ei->i_fat_hash);
 	INIT_HLIST_NODE(&ei->i_dir_hash);
+	inode_mbhs_init_once(&ei->i_mbh);
 	inode_init_once(&ei->vfs_inode);
 }
 
@@ -1281,6 +1286,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
 	mutex_init(&sbi->nfs_build_inode_lock);
 	ratelimit_state_init(&sbi->ratelimit, DEFAULT_RATELIMIT_INTERVAL,
 			     DEFAULT_RATELIMIT_BURST);
+	sb_init_inode_fields(sb, fat_inode_fields);
 
 	error = parse_options(sb, data, isvfat, silent, &debug, &sbi->options);
 	if (error)
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux