From: Andreas Dilger <adilger@sun.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] resize2fs vs. large inodes, take 2
Date: Mon, 03 Mar 2008 15:05:52 -0700 [thread overview]
Message-ID: <20080303220552.GS3616@webber.adilger.int> (raw)
In-Reply-To: <47CC622F.8030900@redhat.com>
On Mar 03, 2008 14:40 -0600, Eric Sandeen wrote:
> large inodes with both fast symlinks and in-inode selinux attrs
> were not surviving moves via resize2fs.
>
> Somehow I missed that there was an ext2fs_get_next_inode_full...
> I think the below fix is correct, on top of my previous patch
> (and what is in e2fsprogs-1.40.7...)
>
> ------------------- changelog ----------------------
>
> Use ext2fs_get_next_inode_full() in resize2fs; previous attempt
> was not properly handling all cases, and was incorrectly setting
> i_extra_isize.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
>
> Index: e2fsprogs-1.40.7/resize/resize2fs.c
> ===================================================================
> --- e2fsprogs-1.40.7.orig/resize/resize2fs.c
> +++ e2fsprogs-1.40.7/resize/resize2fs.c
> @@ -1168,11 +1168,12 @@ static errcode_t inode_scan_and_fix(ext2
> * elsewhere in the inode table
> */
> while (1) {
> - retval = ext2fs_get_next_inode(scan, &ino, &inode);
> + retval = ext2fs_get_next_inode_full(scan, &ino, buf, inode_size);
> if (retval) goto errout;
> if (!ino)
> break;
>
> + memcpy(&inode, buf, sizeof(struct ext2_inode));
Should this be using "sizeof(struct ext2_inode)" or should it be using
"sb->s_inode_size" instead (extracted from the right struct of course)?
Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.
next prev parent reply other threads:[~2008-03-03 22:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-03 20:40 [PATCH] resize2fs vs. large inodes, take 2 Eric Sandeen
2008-03-03 22:05 ` Andreas Dilger [this message]
2008-03-03 22:18 ` Eric Sandeen
2008-03-04 3:19 ` [PATCH] resize2fs vs. large inodes, take 3 Eric Sandeen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080303220552.GS3616@webber.adilger.int \
--to=adilger@sun.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox