[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: fsck: i_blocks N, should be N/2



On Oct 18, 2001  22:04 +0400, Eugene Crosser wrote:
> The system works without any apparent problem, but because this is a
> notebook which is often shut down and restarted, the maximum mounts
> count expires pretty fast.  So, when the thing decided that it's time
> to run fsck, I saw a whole lot of messages
> 
>    Inode XXX, i_blocks is 16, should be 8.  Fix<y>?
> 
> and so on, with different inodes and i_blocks.  But in *all* cases
> "should be" value was exactly twice as small as the original.  I did
> not notice any problems on the system after fsck completed.

What would help greatly is to find out which value is correct.  I suspect
that e2fsck is right about this, and the ext3 code is wrong, but best to
be sure.  Also, does this re-occur after some usage, or is it a one-time
issue that is fixed and doesn't happen again?

One of the "problems" with a journaled fs over an un-journaled fs is that
it gets checked much less frequently.  As a result, you may have a problem
around from a while ago that has already been fixed (doesn't quite sound
like it though).  Luckily, you haven't turned off the "maximum mount count"
checking (like some people have) which is exactly designed to catch this
sort of problem.  (For those of you who DO turn off the maximum mount count
checking, at least leave on the 6-month checks for this reason, bad hardware
and other possible problems).

The "correct" answer is that i_blocks is in units of 512-byte sectors and
NOT fs blocks (1kB, 2kB, or (normally) 4kB).  This is a bit of a wart that
"limits" individual files to 2TB instead of the 16TB they could be.  It is
probably relatively easy to find the bug - check for all places where
i_blocks is changed, and if they don't have something like:

i_blocks = fs_blocks << (blocksize_bits - 9)

the "blocksize_bits - 9" or similar it is wrong.

Cheers, Andreas
--
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]