* Re: ext3 truncate bug in 2.6.0?
2003-12-18 21:07 ext3 truncate bug in 2.6.0? Kurt Roeckx
@ 2003-12-18 21:29 ` Richard B. Johnson
2003-12-18 23:25 ` Kurt Roeckx
2003-12-19 14:14 ` Jan Kara
1 sibling, 1 reply; 5+ messages in thread
From: Richard B. Johnson @ 2003-12-18 21:29 UTC (permalink / raw)
To: Kurt Roeckx; +Cc: linux-kernel
On Thu, 18 Dec 2003, Kurt Roeckx wrote:
> 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
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.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: ext3 truncate bug in 2.6.0?
2003-12-18 21:07 ext3 truncate bug in 2.6.0? Kurt Roeckx
2003-12-18 21:29 ` Richard B. Johnson
@ 2003-12-19 14:14 ` Jan Kara
2003-12-20 3:20 ` Andrew Morton
1 sibling, 1 reply; 5+ messages in thread
From: Jan Kara @ 2003-12-19 14:14 UTC (permalink / raw)
To: Kurt Roeckx; +Cc: linux-kernel, akpm
[-- Attachment #1: Type: text/plain, Size: 978 bytes --]
Hi,
it seems there's really a problem - does attached patch fix it?
Honza
> 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
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Jan Kara <jack@suse.cz>
SuSE CR Labs
[-- Attachment #2: balloc.c.diff --]
[-- Type: text/plain, Size: 277 bytes --]
--- linux/fs/ext3/balloc.c Fri Dec 19 15:09:19 2003
+++ linux/fs/ext3/balloc.c Fri Dec 19 15:10:18 2003
@@ -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;
}
/*
^ permalink raw reply [flat|nested] 5+ messages in thread