Re: PATCH for Corrupted IO on all block devices

From: Andrea Arcangeli (andrea@suse.de)
Date: Tue Jul 17 2001 - 21:35:06 EST


On Tue, Jul 17, 2001 at 07:05:32PM -0700, David S. Miller wrote:
>
> Linus Torvalds writes:
> > What filesystem do you see the bug with?
>
> His report did specifically mention "databases". But my initial
> impression was the same as yours, that this is a bug in the user.

it is:

--- corruption.c.orig Wed Jul 18 04:14:15 2001
+++ corruption.c Wed Jul 18 04:31:29 2001
@@ -22,7 +22,7 @@
                 int i, buffer[RD_BUFF_SZ];
                 fflush(fp);
                 fseek(fp, o, SEEK_SET);
- fread(buffer, sizeof(int), sizeof(buffer), fp);
+ fread(buffer, 1, sizeof(buffer), fp);
                 printf("Validating end of file writes\n");
                 for(i = (RD_BUFF_SZ - 1); i >= 0; i--) {
                     assert(buffer[i] == --j) ;

Andrea
-
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/



This archive was generated by hypermail 2b29 : Mon Jul 23 2001 - 21:00:10 EST