[save copy of corrupted block for closer investigation
timo.lindfors@iki.fi**20080624182158] {
hunk ./src/crcloop.c 65
+#define MAX_CORRUPTIONS 8
hunk ./src/crcloop.c 72
+    __u8 *corruption;
+    int corruption_head;
hunk ./src/crcloop.c 98
+    state->corruption = vmalloc(MAX_CORRUPTIONS*4096);
+    if (state->corruption == NULL) {
+	vfree(state->checksum);
+	kfree(state);
+	return -ENOMEM;
+    }
+
+    state->corruption_head = 0;
+
hunk ./src/crcloop.c 139
-	    printk(KERN_ERR "crcloop: block %llu has checksum %08x but it should have %08x\n",
+	    printk(KERN_ERR "crcloop: block %llu has checksum %08x but it should have %08x, see %p\n",
hunk ./src/crcloop.c 142
-		   state->checksum[block]);
+		   state->checksum[block],
+		   state->corruption + state->corruption_head*4096);
+	    memcpy(state->corruption + state->corruption_head*4096,
+		   buf,
+		   4096);
+	    state->corruption_head = (state->corruption_head + 1) % MAX_CORRUPTIONS;
hunk ./src/crcloop.c 188
+    vfree(state->corruption);
+    FLOW();
}
