Commit:     0040d9875dcccfcb2131417b10fbd9841bc5f05b
Parent:     42a10add852e6291a7544afd8a286622a3e6ae76
Author:     Eric Sandeen <[EMAIL PROTECTED]>
AuthorDate: Tue Feb 5 22:36:43 2008 -0500
Committer:  Theodore Ts'o <[EMAIL PROTECTED]>
CommitDate: Tue Feb 5 22:36:43 2008 -0500

    allow in-inode EAs on ext4 root inode
    The ext3 root inode was treated specially with respect
    to in-inode extended attributes, for reasons detailed
    in the removed comment below.  The first mkfs-created
    inodes would not get extra_i_size or the EXT3_STATE_XATTR
    flag set in ext3_read_inode, which disallowed reading or
    setting in-inode EAs on the root.
    However, in ext4, ext4_mark_inode_dirty calls
    ext4_expand_extra_isize for all inodes; once this is done
    EAs may be placed in the root ext4 inode body.
    But for reasons above, it won't be found after a reboot.
    setfattr -n -v value mntpt/
    setfattr -n user.name2 -v value2 mntpt/
    umount mntpt/; remount mntpt/
    getfattr -d mntpt/
    name2/value2 has gone missing; debugfs shows it in the
    inode body, but it is not found there by getattr.
    The following fixes it up; newer mkfs appears to properly
    zero the inodes, so this workaround isn't needed for ext4.
    Signed-off-by: Eric Sandeen <[EMAIL PROTECTED]>
    Signed-off-by: Theodore Ts'o <[EMAIL PROTECTED]>
 fs/ext4/inode.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index f4e3874..bbfabf8 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2758,13 +2758,7 @@ struct inode *ext4_iget(struct super_block *sb, unsigned 
long ino)
                ei->i_data[block] = raw_inode->i_block[block];
-       if (inode->i_ino >= EXT4_FIRST_INO(inode->i_sb) + 1 &&
-           EXT4_INODE_SIZE(inode->i_sb) > EXT4_GOOD_OLD_INODE_SIZE) {
-               /*
-                * When mke2fs creates big inodes it does not zero out
-                * the unused bytes above EXT4_GOOD_OLD_INODE_SIZE,
-                * so ignore those first few inodes.
-                */
+       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)) {
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to