From: Valerie Clement <valerie.clement@bull.net>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Avantika Mathur <mathur@linux.vnet.ibm.com>,
linux-ext4@vger.kernel.org,
Andreas Dilger <adilger@clusterfs.com>,
cmm@us.ibm.com
Subject: Re: [PATCH] Ext4: Uninitialized Block Groups
Date: Wed, 19 Sep 2007 14:01:40 +0200 [thread overview]
Message-ID: <46F10FA4.6060902@bull.net> (raw)
In-Reply-To: <46F1094F.1080906@linux.vnet.ibm.com>
Aneesh Kumar K.V wrote:
> the variable free is confusingly named here. It is not the free inode
> count.
> rather it indicate the last used relative inode number in the group. How
> about
> the below ?
>
> -aneesh
I agree, it's better.
Valérie
>
> diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
> index 4250c02..cfe2e09 100644
> --- a/fs/ext4/ialloc.c
> +++ b/fs/ext4/ialloc.c
> @@ -633,17 +633,21 @@ got:
> /* If we didn't allocate from within the initialized part of the inode
> * table then we need to initialize up to this inode. */
> if (EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_GDT_CSUM)) {
> - if (gdp->bg_flags & cpu_to_le16(EXT4_BG_INODE_UNINIT)) {
> + if (gdp->bg_flags & cpu_to_le16(EXT4_BG_INODE_UNINIT))
> gdp->bg_flags &= cpu_to_le16(~EXT4_BG_INODE_UNINIT);
> - free = EXT4_INODES_PER_GROUP(sb);
> - } else {
> - free = EXT4_INODES_PER_GROUP(sb) -
> - le16_to_cpu(gdp->bg_itable_unused);
> - }
>
> - if (ino > free)
> + /*
> + * Check the relative inode number against the last used
> + * relative inode number in this group. if it is greater
> + * we need to update the bg_itable_unused count
> + *
> + */
> + if (ino > (EXT4_INODES_PER_GROUP(sb) -
> + le16_to_cpu(gdp->bg_itable_unused))) {
> +
> gdp->bg_itable_unused =
> cpu_to_le16(EXT4_INODES_PER_GROUP(sb) - ino);
> + }
> }
>
> gdp->bg_free_inodes_count =
>
next prev parent reply other threads:[~2007-09-19 12:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-19 0:25 [PATCH] Ext4: Uninitialized Block Groups Avantika Mathur
2007-09-19 3:03 ` Andrew Morton
2007-09-19 6:30 ` Andreas Dilger
2007-09-19 22:54 ` Avantika Mathur
2007-09-19 22:54 ` Avantika Mathur
2007-09-19 3:05 ` Andrew Morton
2007-09-19 12:06 ` Valerie Clement
2007-09-19 11:34 ` Aneesh Kumar K.V
2007-09-19 12:01 ` Valerie Clement [this message]
2007-09-19 16:42 ` Andreas Dilger
2007-09-19 19:19 ` Avantika Mathur
2007-09-20 23:22 ` Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2007-10-04 5:50 [PATCH, RFC] Ext4 patches planned for submission upstream Theodore Ts'o
2007-10-04 5:50 ` [PATCH] jbd/jbd2: JBD memory allocation cleanups Theodore Ts'o
2007-10-04 5:50 ` [PATCH] jbd/jbd2: Journal initialization doesn't need __GFP_NOFAIL Theodore Ts'o
2007-10-04 5:50 ` [PATCH] JBD2/Ext4: Convert kmalloc to kzalloc in jbd2/ext4 Theodore Ts'o
[not found] ` <1191477059-5357-5-git-send-email-tytso@mit.edu>
2007-10-04 5:50 ` [PATCH] jbd2: fix commit code to properly abort journal Theodore Ts'o
2007-10-04 5:50 ` [PATCH] JBD2: debug code cleanup Theodore Ts'o
2007-10-04 5:50 ` [PATCH] Once ext4 will not implement fragment, it is believed it will never be Theodore Ts'o
2007-10-04 5:50 ` [PATCH] ext4: remove #ifdef CONFIG_EXT4_INDEX Theodore Ts'o
2007-10-04 5:50 ` [PATCH] Ext4: Uninitialized Block Groups Theodore Ts'o
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=46F10FA4.6060902@bull.net \
--to=valerie.clement@bull.net \
--cc=adilger@clusterfs.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=cmm@us.ibm.com \
--cc=linux-ext4@vger.kernel.org \
--cc=mathur@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.