From: Jan Kara Subject: [PATCH 11/17] affs: Use own optional list for metadata bhs Date: Fri, 2 May 2014 15:20:02 +0200 Message-ID: <1399036808-24521-12-git-send-email-jack@suse.cz> References: <1399036808-24521-1-git-send-email-jack@suse.cz> Cc: Al Viro , Jan Kara To: linux-fsdevel@vger.kernel.org Return-path: Received: from cantor2.suse.de ([195.135.220.15]:53374 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752479AbaEBNUP (ORCPT ); Fri, 2 May 2014 09:20:15 -0400 In-Reply-To: <1399036808-24521-1-git-send-email-jack@suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Signed-off-by: Jan Kara --- fs/affs/affs.h | 2 ++ fs/affs/super.c | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/fs/affs/affs.h b/fs/affs/affs.h index 3952121f2f28..776c80259def 100644 --- a/fs/affs/affs.h +++ b/fs/affs/affs.h @@ -59,6 +59,8 @@ struct affs_inode_info { u32 i_protect; /* unused attribute bits */ u32 i_lastalloc; /* last allocated block */ int i_pa_cnt; /* number of preallocated blocks */ + struct inode_meta_bhs i_mbh; /* list of metadata buffers + associated with the inode */ struct inode vfs_inode; }; diff --git a/fs/affs/super.c b/fs/affs/super.c index d098731b82ff..425c5a33f63f 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c @@ -25,6 +25,11 @@ extern struct timezone sys_tz; static int affs_statfs(struct dentry *dentry, struct kstatfs *buf); static int affs_remount (struct super_block *sb, int *flags, char *data); +static int affs_inode_fields[IF_FIELD_NR] = { + [IF_META_BHS] = (int)offsetof(struct affs_inode_info, i_mbh) - + (int)offsetof(struct affs_inode_info, vfs_inode), +}; + static void affs_commit_super(struct super_block *sb, int wait) { @@ -125,6 +130,7 @@ static void init_once(void *foo) sema_init(&ei->i_link_lock, 1); sema_init(&ei->i_ext_lock, 1); + inode_mbhs_init_once(&ei->i_mbh); inode_init_once(&ei->vfs_inode); } @@ -347,6 +353,7 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent) sbi->s_uid = uid; sbi->s_gid = gid; sbi->s_reserved= reserved; + sb_init_inode_fields(sb, affs_inode_fields); /* Get the size of the device in 512-byte blocks. * If we later see that the partition uses bigger -- 1.8.1.4