lkml.org 
[lkml]   [2006]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: ext3: bogus i_mode errors with 2.6.18.1
On 12:01, Andreas Dilger wrote:
> On Oct 26, 2006 18:02 +0200, Andre Noll wrote:
> > On 03:36, Andreas Dilger wrote:
> > > The other issue is that you need to potentially set "num" bits in the
> > > bitmap here, if those all overlap metadata. In fact, it might just
> > > make more sense at this stage to walk all of the bits in the bitmaps,
> > > the inode table and the backup superblock and group descriptor to see
> > > if they need fixing also.
> >
> > I tried to implement this, but I could not find out how to check at this
> > point whether a given bit (in the block bitmap, say) needs fixing.
>
> Well, since we know at least one bit needs fixing and results in the block
> being written to disk then setting the bits for all of the other metadata
> blocks in this group has no extra IO cost (only a tiny amount of CPU).
> Re-setting the bits if they are already set is not harmful.

I.e, something like

int i;
ext3_fsblk_t bit;
unsigned long gdblocks = EXT3_SB(sb)->s_gdb_count;

for (i = 0, bit = 1; i < gdblocks; i++, bit++)
ext3_set_bit(bit, gdp_bh->b_data);

Is that correct?

Andre
--
The only person who always got his work done by Friday was Robinson Crusoe
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2006-10-27 17:37    [W:0.419 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site