[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100826092636.C31C.61FB500B@jp.fujitsu.com>
Date: Thu, 26 Aug 2010 09:26:37 +0900
From: Masayoshi MIZUMA <m.mizuma@...fujitsu.com>
To: Jan Kara <jack@...e.cz>
Cc: Andreas Dilger <adilger.kernel@...ger.ca>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-ext4 <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH] [RESEND] ext3: set i_extra_isize of 11th inode
On Thu, 26 Aug 2010 01:04:42 +0200
Jan Kara <jack@...e.cz> wrote:
> So I'd rather choose a safer approach for ext3 - see attached patch - it
> fixes the problem for me. For ext4 your patch is definitely a way to go,
> so please port it to ext4 and send it to Ted Tso. Thanks.
This problem doesn't happen at ext4. Because, the i_extra_isize of 11th
inode is set to the suitable value by ext4_iget().
-----------------------------------------------------------
struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
{
(snip)
if (EXT4_INODE_SIZE(inode->i_sb) > EXT4_GOOD_OLD_INODE_SIZE) {
ei->i_extra_isize = le16_to_cpu(raw_inode->i_extra_isize);
if (EXT4_GOOD_OLD_INODE_SIZE + ei->i_extra_isize >
EXT4_INODE_SIZE(inode->i_sb)) {
ret = -EIO;
goto bad_inode;
}
if (ei->i_extra_isize == 0) {
/* The extra space is currently unused. Use it. */
ei->i_extra_isize = sizeof(struct ext4_inode) -
EXT4_GOOD_OLD_INODE_SIZE;
} else {
__le32 *magic = (void *)raw_inode +
EXT4_GOOD_OLD_INODE_SIZE +
ei->i_extra_isize;
if (*magic == cpu_to_le32(EXT4_XATTR_MAGIC))
ext4_set_inode_state(inode, EXT4_STATE_XATTR);
}
} else
ei->i_extra_isize = 0;
-----------------------------------------------------------
Thanks,
Masayoshi
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists