[PATCH 09/17] ext2: 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/ext2/ext2.h  | 2 ++
 fs/ext2/super.c | 7 +++++++
 2 files changed, 9 insertions(+)

diff --git a/fs/ext2/ext2.h b/fs/ext2/ext2.h
index d9a17d0b124d..aa446bb4e5df 100644
--- a/fs/ext2/ext2.h
+++ b/fs/ext2/ext2.h
@@ -15,6 +15,7 @@
 #include <linux/blockgroup_lock.h>
 #include <linux/percpu_counter.h>
 #include <linux/rbtree.h>
+#include <linux/buffer_head.h>
 
 /* XXX Here for now... not interested in restructing headers JUST now */
 
@@ -689,6 +690,7 @@ struct ext2_inode_info {
 	struct mutex truncate_mutex;
 	struct inode	vfs_inode;
 	struct list_head i_orphan;	/* unlinked but open inodes */
+	struct inode_meta_bhs i_mbh;	/* indirect block bhs for inode */
 };
 
 /*
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index 20d6697bd638..4bfcc1faf431 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -45,6 +45,11 @@ static int ext2_sync_fs(struct super_block *sb, int wait);
 static int ext2_freeze(struct super_block *sb);
 static int ext2_unfreeze(struct super_block *sb);
 
+static int ext2_inode_fields[IF_FIELD_NR] = {
+	[IF_META_BHS] = offsetof(struct ext2_inode_info, i_mbh) -
+			offsetof(struct ext2_inode_info, vfs_inode),
+};
+
 void ext2_error(struct super_block *sb, const char *function,
 		const char *fmt, ...)
 {
@@ -189,6 +194,7 @@ static void init_once(void *foo)
 	init_rwsem(&ei->xattr_sem);
 #endif
 	mutex_init(&ei->truncate_mutex);
+	inode_mbhs_init_once(&ei->i_mbh);
 	inode_init_once(&ei->vfs_inode);
 }
 
@@ -790,6 +796,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
 	}
 	sb->s_fs_info = sbi;
 	sbi->s_sb_block = sb_block;
+	sb_init_inode_fields(sb, ext2_inode_fields);
 
 	spin_lock_init(&sbi->s_lock);
 
-- 
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