From: Tao Ma <tm@tao.ma>
To: linux-ext4@vger.kernel.org
Cc: Yu Jian <yujian@whamcloud.com>,
Andreas Dilger <adilger@whamcloud.com>,
"Theodore Ts'o" <tytso@mit.edu>
Subject: [PATCH] ext4: Don't set s_buddy_cache->i_ino to EXT4_BAD_INO
Date: Wed, 17 Aug 2011 16:20:22 +0800 [thread overview]
Message-ID: <1313569222-5079-1-git-send-email-tm@tao.ma> (raw)
From: Tao Ma <boyu.mt@taobao.com>
In 85fe4025, Christoph removed get_next_ino() from new_inode() and
do s_buddy_cache->i_ino = get_next_ino();
And then 48e6061b gives EXT4_BAD_INO to this inode. But actually
s_buddy_cache is used directly and we never get it from an inode number.
So it should be safe for us to not set i_ino at all and I guess that
is the case Christoph described in his commit log of 85fe4025
"For a few more filesystems we can avoid assigning any inode number given
that they aren't user visible".
Cc: Yu Jian <yujian@whamcloud.com>
Cc: Andreas Dilger <adilger@whamcloud.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
---
fs/ext4/mballoc.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 17a5a57..982f783 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2342,11 +2342,6 @@ static int ext4_mb_init_backend(struct super_block *sb)
ext4_msg(sb, KERN_ERR, "can't get new inode");
goto err_freesgi;
}
- /* To avoid potentially colliding with an valid on-disk inode number,
- * use EXT4_BAD_INO for the buddy cache inode number. This inode is
- * not in the inode hash, so it should never be found by iget(), but
- * this will avoid confusion if it ever shows up during debugging. */
- sbi->s_buddy_cache->i_ino = EXT4_BAD_INO;
EXT4_I(sbi->s_buddy_cache)->i_disksize = 0;
for (i = 0; i < ngroups; i++) {
desc = ext4_get_group_desc(sb, i, NULL);
--
1.7.0.4
next reply other threads:[~2011-08-17 8:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-17 8:20 Tao Ma [this message]
2011-08-17 15:31 ` [PATCH] ext4: Don't set s_buddy_cache->i_ino to EXT4_BAD_INO Andreas Dilger
2011-08-17 15:38 ` Tao Ma
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=1313569222-5079-1-git-send-email-tm@tao.ma \
--to=tm@tao.ma \
--cc=adilger@whamcloud.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=yujian@whamcloud.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;
as well as URLs for NNTP newsgroup(s).