Re: [PATCH] fix htree dir corrupt after fsck -fD

Ryan Cumming
2002-09-30T02:41:46Z

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On September 29, 2002 01:16, Ryan Cumming wrote:
> Case 1:
> "Problem in HTREE directory inode 2 (/): bad block 3223649"
>
> Case 2:
> "Inode 2, i_blocks is 3718, should be 2280
> Directory inode 2 has an unallocated block #377
> Directory inode 2 has an unallocated block #378
> Directory inode 2 has an unallocated block #379"
> etc

Okay, a few more datapoints:
1) Case #1 happens much more frequently than case #2
2) I can trigger filesystem corruption with nothing but non-concurrent
readdir()s and unlink()s
3) Although my initial tests were reaching the filesystem's inode limit, I've
been able to reproduce case #1 with 153,129 free inodes and 217,294 free
blocks.
4) Case #1 persists with Chris' stack overflow fix, modified to use memmove
instead of memcpy
5) I have not been able to reproduce either error without the dir_index flag
set. This may be due to the fact that my test program runs -much- more slowly
without directory indexing.

- -Ryan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)

iD8DBQE9l7slLGMzRzbJfbQRAtbnAKCo5c6NzuGY59Xy4MvCRFqwuw5/+gCgpQkr
FBXfCLl2R2ii/PiJ3+0ZQR8=
=droh
-----END PGP SIGNATURE-----