Whamcloud - gitweb
Branch b1_6
authoradilger <adilger>
Sat, 2 Jun 2007 08:00:52 +0000 (08:00 +0000)
committeradilger <adilger>
Sat, 2 Jun 2007 08:00:52 +0000 (08:00 +0000)
Fix up error message for the case where a client hits a bogus checksum
error.  This only happens during mmap IO, and can be seen when the
client-side checksum matches the new checksum found on the server,
or has changed again since the message was originally sent.

In preparation for turning checksumming on by default.
b=11742
i=scjody
i=adilger (behlendorf original patch)

lustre/osc/osc_request.c

index 89a07b2..4e0dd73 100644 (file)
@@ -1024,11 +1024,13 @@ static int check_write_checksum(struct obdo *oa, const lnet_process_id_t *peer,
         new_cksum = osc_checksum_bulk(nob, page_count, pga);
 
         if (new_cksum == server_cksum)
-                msg = "changed on the client after we checksummed it";
+                msg = "changed on the client after we checksummed it - "
+                      "likely false positive due to mmap IO (bug 11742)";
         else if (new_cksum == client_cksum)
                 msg = "changed in transit before arrival at OST";
         else
-                msg = "changed in transit AND doesn't match the original";
+                msg = "changed in transit AND doesn't match the original - "
+                      "likely false positive due to mmap IO (bug 11742)";
 
         LCONSOLE_ERROR("BAD WRITE CHECKSUM: %s: from %s inum "LPU64"/"LPU64
                        " object "LPU64"/"LPU64" extent ["LPU64"-"LPU64"]\n",
@@ -1092,10 +1094,10 @@ static int osc_brw_fini_request(struct ptlrpc_request *req, int rc)
                 if (unlikely((aa->aa_oa->o_valid & OBD_MD_FLCKSUM) &&
                              client_cksum &&
                              check_write_checksum(&body->oa, peer, client_cksum,
-                                                 body->oa.o_cksum,
-                                                 aa->aa_requested_nob,
-                                                 aa->aa_page_count,
-                                                 aa->aa_ppga)))
+                                                  body->oa.o_cksum,
+                                                  aa->aa_requested_nob,
+                                                  aa->aa_page_count,
+                                                  aa->aa_ppga)))
                         RETURN(-EAGAIN);
 
                 rc = check_write_rcs(req, aa->aa_requested_nob,aa->aa_nio_count,