ext3 truncate bug in 2.6.0?
When writing to the file, and the filesystem (ext3) is full, it seems to block count gets wrong.
I ran an e2fsck on the fs and found no problems. Then I mounted it again, wrote a file until the fs was full, unmounted and ran e2fsck again, and get this:
e2fsck 1.32 (09-Nov-2002)
Pass 1: Checking inodes, blocks, and sizes
Inode 276481, i_blocks is 681584, should be 681582. Fix<y>?
If my memory is any good, their was a simular problem in 2.4 once.
I'm testing this with 2.6.0-test11, but couldn't find anything in the changelog for 2.6.0.
Kurt
Quoted 7 lines · Kurt Roeckx
When writing to the file, and the filesystem (ext3) is full, it seems to block count gets wrong.
I ran an e2fsck on the fs and found no problems. Then I mounted it again, wrote a file until the fs was full, unmounted and ran e2fsck again, and get this:
Quoted 5 lines
e2fsck 1.32 (09-Nov-2002)
Pass 1: Checking inodes, blocks, and sizes
Inode 276481,i_blocksis 681584, should be 681582. Fix<y>?If my memory is any good, their was a simular problem in 2.4
No such problem on 2.4.22, SMP, with SCSI disks.
Script started on Thu Dec 18 16:21:28 2003
# cat /dev/zero >/home/users/foo cat: write error: No space left on device # umount /home/users # fsck /dev/sdc3 Parallelizing fsck version 1.19 (13-Jul-2000) e2fsck 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09 /dev/sdc3: clean, 91715/286272 files, 572315/572315 blocks # fsck -f /dev/sdc3 Parallelizing fsck version 1.19 (13-Jul-2000) e2fsck 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09 Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information /dev/sdc3: 91715/286272 files (0.2% non-contiguous), 572315/572315 blocks # mount -a # rm /home/users/foo # umount /home/users # fsck -f /dev/sdc3 Parallelizing fsck version 1.19 (13-Jul-2000) e2fsck 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09 Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information /dev/sdc3: 91714/286272 files (0.2% non-contiguous), 463734/572315 blocks # mount -a # df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sdb1 16603376 5866060 9893908 37% / /dev/sdc1 6356624 1217040 4816680 20% /alt /dev/sda1 1048272 280928 767344 27% /dos/drive_C /dev/sda5 1046224 181280 864944 17% /dos/drive_D /dev/sdc3 2253284 1818960 319864 85% /home/users # exit exit Script done on Thu Dec 18 16:26:49 2003
Cheers,
Dick Johnson
Penguin : Linux version 2.4.22 on an i686 machine (797.90 BogoMips).
Note 96.31% of all statistics are fiction.
Quoted 5 lines · Richard B. Johnson
Quoted 1 line · Kurt Roeckx
If my memory is any good, their was a simular problem in 2.4
No such problem on 2.4.22, SMP, with SCSI disks.
Was, as in it was fixed ages ago.
Kurt
Hi,
it seems there's really a problem - does attached patch fix it?
Honza
Quoted 25 lines
When writing to the file, and the filesystem (ext3) is full, it seems to block count gets wrong.
I ran an e2fsck on the fs and found no problems. Then I mounted it again, wrote a file until the fs was full, unmounted and ran e2fsck again, and get this:
e2fsck 1.32 (09-Nov-2002)
Pass 1: Checking inodes, blocks, and sizes
Inode 276481,i_blocksis 681584, should be 681582. Fix<y>?If my memory is any good, their was a simular problem in 2.4 once.
I'm testing this with 2.6.0-test11, but couldn't find anything in the changelog for 2.6.0.
Kurt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 2 lines
Jan Kara <[email protected]> SuSE CR Labs
fs/ext3/balloc.c +1 -1
@@ -517,7 +517,7 @@ sbi->s_resuid != current->fsuid && (sbi->s_resgid == 0 || !in_group_p (sbi->s_resgid))) { *errp = -ENOSPC ; -return 0 ; + goto out; }/*
Quoted 5 lines · Jan Kara
Hi,
it seems there's really a problem - does attached patch fix it?
I think it will - thanks for that.
Quoted 12 lines
fs/ext3/balloc.c +1
-1@@ -517,7 +517,7 @@ sbi->s_resuid != current->fsuid && (sbi->s_resgid == 0 || !in_group_p (sbi->s_resgid))) { *errp = -ENOSPC ; -return 0 ; + goto out; }/*