From: ck ya <ykwan0201@gmail.com>
To: linux-ext4@vger.kernel.org
Subject: fsck get error with the file which is > 2TB in 4k block file system
Date: Thu, 21 Oct 2010 11:51:52 +0800 [thread overview]
Message-ID: <AANLkTik6mjHAZG2ePmDyBmb6CRhV8=dD_tTTdhCzykca@mail.gmail.com> (raw)
I compiled the latest e2fsprogs, and do fsck with -nvf on my ext4 file system.
It showed
Inode 18, i_blocks is 17179870744, should be 17179870744. Fix? no
The i_blocks is the same.
I found ext2fs_inode_i_blocks() has problem. The function check
EXT4_FEATURE_RO_COMPAT_HUGE_FILE with "s_feature_compat". It should
be "s_feature_ro_compat".
Thanks.
diff --git a/lib/ext2fs/blknum.c b/lib/ext2fs/blknum.c
index a48b696..d67c6ec 100644
--- a/lib/ext2fs/blknum.c
+++ b/lib/ext2fs/blknum.c
@@ -49,7 +49,7 @@ blk64_t ext2fs_inode_data_blocks2(ext2_filsys fs,
struct ext2_inode *inode)
{
return (inode->i_blocks |
- ((fs->super->s_feature_incompat &
+ ((fs->super->s_feature_ro_incompat &
EXT4_FEATURE_RO_COMPAT_HUGE_FILE) ?
(__u64) inode->osd2.linux2.l_i_blocks_hi << 32 : 0)) -
(inode->i_file_acl ? fs->blocksize >> 9 : 0);
@@ -62,7 +62,7 @@ blk64_t ext2fs_inode_i_blocks(ext2_filsys fs,
struct ext2_inode *inode)
{
return (inode->i_blocks |
- ((fs->super->s_feature_incompat &
+ ((fs->super->s_feature_ro_incompat &
EXT4_FEATURE_RO_COMPAT_HUGE_FILE) ?
(__u64)inode->osd2.linux2.l_i_blocks_hi << 32 : 0));
}
next reply other threads:[~2010-10-21 3:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-21 3:51 ck ya [this message]
2010-10-21 15:06 ` fsck get error with the file which is > 2TB in 4k block file system Eric Sandeen
2010-10-21 17:04 ` Justin Maggard
2010-10-21 17:15 ` 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='AANLkTik6mjHAZG2ePmDyBmb6CRhV8=dD_tTTdhCzykca@mail.gmail.com' \
--to=ykwan0201@gmail.com \
--cc=linux-ext4@vger.kernel.org \
/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).