Re: 2.2.6_andrea3.bz2 (fixed an interesting (harmless) bug) [Re:

Andrea Arcangeli (andrea@e-mind.com)
Tue, 27 Apr 1999 11:54:29 +0200 (CEST)


On Tue, 27 Apr 1999, Andrea Arcangeli wrote:

> ftp://e-mind.com/pub/andrea/kernel/2.2.6_andrea3.bz2

It has problems. The main problem is that trying to get the maximal
performances from the I/O subsystem I removed some harming
run_task_queue(&tq_disk) from some place and doing that I allowed an
ext2_truncate bug to see the light.

This patch will fix the bug:

Index: fs/ext2/truncate.c
===================================================================
RCS file: /var/cvs/linux/fs/ext2/truncate.c,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 truncate.c
--- linux/fs/ext2/truncate.c 1999/02/09 18:52:03 1.1.2.3
+++ linux/fs/ext2/truncate.c 1999/04/27 09:09:29
@@ -393,6 +393,7 @@
return;
ext2_discard_prealloc(inode);
while (1) {
+ run_task_queue(&tq_disk);
retry = trunc_direct(inode);
retry |= trunc_indirect (inode,
EXT2_IND_BLOCK,

The problem is that ext2_truncate wait in an infinite loop that a buffer
become unlocked, but before do that it _must_ make sure that any pending
I/O will start for real (otherwise it can loop at inifinity as it was
happening here...).

Andrea Arcangeli

PS. I have some other thing to do now, then I'll release a fixed
2.2.6_andrea4.bz2 with some other buffer.c change included.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/