Whamcloud - gitweb
Don't check bulk contents if there was an error reported on the bulk itself.
authoradilger <adilger>
Mon, 2 Sep 2002 19:04:21 +0000 (19:04 +0000)
committeradilger <adilger>
Mon, 2 Sep 2002 19:04:21 +0000 (19:04 +0000)
lustre/obdclass/class_obd.c

index 98af2b0..8f789cb 100644 (file)
@@ -548,20 +548,19 @@ static int obd_class_ioctl (struct inode * inode, struct file * filp,
                 }
 
                 err = obd_brw(rw, &conn, &smd, j, pga, ll_sync_io_cb, cbd);
+                if (err)
+                        CERROR("test_brw: error from obd_brw: err = %d\n", err);
                 EXIT;
         brw_cleanup:
                 for (j = 0, pgp = pga; j < pages; j++, pgp++) {
                         if (pgp->pg != NULL) {
-                                if (verify) {
+                                if (verify && !err) {
                                         void *addr = kmap(pgp->pg);
-                                        int err2;
-
-                                        err2 = page_debug_check("test_brw",
-                                                                addr,
-                                                                PAGE_SIZE,
-                                                                pgp->off,id);
-                                        if (!err)
-                                                err = err2;
+
+                                        err = page_debug_check("test_brw",
+                                                               addr,
+                                                               PAGE_SIZE,
+                                                               pgp->off,id);
                                         kunmap(pgp->pg);
                                 }
                                 __free_pages(pgp->pg, 0);