[PATCH 12/17] bfs: 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/bfs/bfs.h   | 2 ++
 fs/bfs/inode.c | 8 ++++++++
 2 files changed, 10 insertions(+)

diff --git a/fs/bfs/bfs.h b/fs/bfs/bfs.h
index f7f87e233dd9..f86ee8e43705 100644
--- a/fs/bfs/bfs.h
+++ b/fs/bfs/bfs.h
@@ -27,6 +27,8 @@ struct bfs_inode_info {
 	unsigned long i_dsk_ino; /* inode number from the disk, can be 0 */
 	unsigned long i_sblock;
 	unsigned long i_eblock;
+	struct inode_meta_bhs i_mbh;	/* list of metadata buffers associated
+					   with the inode */
 	struct inode vfs_inode;
 };
 
diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c
index 8defc6b3f9a2..2b3283668bd7 100644
--- a/fs/bfs/inode.c
+++ b/fs/bfs/inode.c
@@ -30,6 +30,12 @@ MODULE_LICENSE("GPL");
 #define dprintf(x...)
 #endif
 
+static int bfs_inode_fields[IF_FIELDS_NR] = {
+	[IF_META_BHS] = (int)offsetof(struct bfs_inode_info, i_mbh) -
+			(int)offsetof(struct bfs_inode_info, vfs_inode),
+};
+
+
 void dump_imap(const char *prefix, struct super_block *s);
 
 struct inode *bfs_iget(struct super_block *sb, unsigned long ino)
@@ -263,6 +269,7 @@ static void init_once(void *foo)
 {
 	struct bfs_inode_info *bi = foo;
 
+	inode_mbhs_init_once(&bi->i_mbh);
 	inode_init_once(&bi->vfs_inode);
 }
 
@@ -333,6 +340,7 @@ static int bfs_fill_super(struct super_block *s, void *data, int silent)
 		return -ENOMEM;
 	mutex_init(&info->bfs_lock);
 	s->s_fs_info = info;
+	sb_init_inode_fields(sb, bfs_inode_fields);
 
 	sb_set_blocksize(s, BFS_BSIZE);
 
-- 
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