linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fsck get error with the file which is > 2TB in 4k block file system
@ 2010-10-21  3:51 ck ya
  2010-10-21 15:06 ` Eric Sandeen
  0 siblings, 1 reply; 4+ messages in thread
From: ck ya @ 2010-10-21  3:51 UTC (permalink / raw)
  To: linux-ext4

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));
 }

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: fsck get error with the file which is > 2TB in 4k block file system
  2010-10-21  3:51 fsck get error with the file which is > 2TB in 4k block file system ck ya
@ 2010-10-21 15:06 ` Eric Sandeen
  2010-10-21 17:04   ` Justin Maggard
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Sandeen @ 2010-10-21 15:06 UTC (permalink / raw)
  To: ck ya; +Cc: linux-ext4

ck ya wrote:
> 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".

Seems right to me, if you add [PATCH] to the subject emails like
these, and add:

Signed-off-by: ck ya <ykwan0201@gmail.com>
---

after the patch,

it'd be ideal.

Thanks,
-Eric

> 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));
>  }
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: fsck get error with the file which is > 2TB in 4k block file system
  2010-10-21 15:06 ` Eric Sandeen
@ 2010-10-21 17:04   ` Justin Maggard
  2010-10-21 17:15     ` Eric Sandeen
  0 siblings, 1 reply; 4+ messages in thread
From: Justin Maggard @ 2010-10-21 17:04 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: ck ya, linux-ext4

On Thu, Oct 21, 2010 at 8:06 AM, Eric Sandeen <sandeen@redhat.com> wrote:
> ck ya wrote:
>> 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".
>
> Seems right to me, if you add [PATCH] to the subject emails like
> these, and add:
>
> Signed-off-by: ck ya <ykwan0201@gmail.com>
> ---
>
> after the patch,
>
> it'd be ideal.
>
> Thanks,
> -Eric
>
>> 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));
>>  }

Hmm, looks strikingly similar to what I posted nearly two months ago. :)

-Justin
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: fsck get error with the file which is > 2TB in 4k block file system
  2010-10-21 17:04   ` Justin Maggard
@ 2010-10-21 17:15     ` Eric Sandeen
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Sandeen @ 2010-10-21 17:15 UTC (permalink / raw)
  To: Justin Maggard; +Cc: ck ya, linux-ext4

Justin Maggard wrote:
> On Thu, Oct 21, 2010 at 8:06 AM, Eric Sandeen <sandeen@redhat.com> wrote:
>> ck ya wrote:
>>> 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".
>> Seems right to me, if you add [PATCH] to the subject emails like
>> these, and add:
>>
>> Signed-off-by: ck ya <ykwan0201@gmail.com>
>> ---
>>
>> after the patch,
>>
>> it'd be ideal.
>>
>> Thanks,
>> -Eric
>>
>>> 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));
>>>  }
> 
> Hmm, looks strikingly similar to what I posted nearly two months ago. :)

Whoops, glad you remembered it :)

Ted, I guess that's a ping to merge the fix for that bug ;)

-Eric

> -Justin
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-21 17:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-21  3:51 fsck get error with the file which is > 2TB in 4k block file system ck ya
2010-10-21 15:06 ` Eric Sandeen
2010-10-21 17:04   ` Justin Maggard
2010-10-21 17:15     ` Eric Sandeen

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).