]> granicus.if.org Git - zfs/commitdiff
Ensure zio_bad_cksum_t is initialized
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 22 Jun 2010 04:31:41 +0000 (21:31 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 28 Jun 2010 17:30:38 +0000 (10:30 -0700)
This may not strictly be needed but it does keep gcc happy.  We
should keep our eye on this though if the extra bcopy significantly
impacts performance.  It may.

module/zfs/vdev_raidz.c

index 64c1564bfdb4f7ed739c4ea45daea261a59292b1..cbabb84020de41dc4dd29e3d387390768ced2a17 100644 (file)
@@ -1638,8 +1638,11 @@ raidz_checksum_verify(zio_t *zio)
 {
        zio_bad_cksum_t zbc;
        raidz_map_t *rm = zio->io_vsd;
+       int ret;
 
-       int ret = zio_checksum_error(zio, &zbc);
+       bzero(&zbc, sizeof (zio_bad_cksum_t));
+
+       ret = zio_checksum_error(zio, &zbc);
        if (ret != 0 && zbc.zbc_injected != 0)
                rm->rm_ecksuminjected = 1;