http://defect.opensolaris.org/bz/show_bug.cgi?id=2207

           Summary: scrub/resilver says pools have errors when key not
                    present
    Classification: Development
           Product: zfs-crypto
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: ACCEPTED
          Severity: critical
          Priority: P2
         Component: other
        AssignedTo: darrenm at opensolaris.org
        ReportedBy: darrenm at opensolaris.org
         QAContact: hua.tang at sun.com
                CC: zfs-crypto-discuss at opensolaris.org
   Estimated Hours: 0.0


If a pool or dataset key isn't present when a scrub/resilver is done the
encrypted datasets using that key will be marked as having errors.  They don't
actually have errors it is just that zio_decrypt_data() returned a failure.

Since scrub/resilver don't actually need to decrypt the data, they just need to
verify the checksum.  We can ensure that ZIO_STAGE_READ_DECRYPT doesn't get
added to the pipeline if ZIO_FLAG_SCRUB_THREAD is set.

In theory this should be possible for compression as well however when doing so
I got the following panic:

panic[cpu1]/thread=ffffff00050b1c80: 
assertion failed: bp == 0L ||
(-(-(((((((&((zio)->io_bp)->blk_dva[0]))->dva_word
[1]) >> (63)) & ((1ULL << (1)) - 1)) ? (1ULL << 9) :
(((((((zio)->io_bp)->blk_pr
op[0]) >> (16)) & ((1ULL << (16)) - 1)) + (1)) << (9)))) & -(align))) ==
zio->io
_size, file: ../../common/fs/zfs/zio.c, line: 1994


ffffff00050b17e0 genunix:assfail+7e ()
ffffff00050b1840 zfs:zio_vdev_io_start+2bf ()
ffffff00050b1880 zfs:zio_execute+bb ()
ffffff00050b18a0 zfs:zio_nowait+11 ()
ffffff00050b18e0 zfs:vdev_mirror_io_start+109 ()
ffffff00050b1940 zfs:zio_vdev_io_start+234 ()
ffffff00050b1980 zfs:zio_execute+bb ()
ffffff00050b19a0 zfs:zio_nowait+11 ()
ffffff00050b1a20 zfs:spa_scrub_io_start+11a ()
ffffff00050b1a90 zfs:spa_scrub_cb+1fd ()
ffffff00050b1af0 zfs:traverse_callback+10e ()
ffffff00050b1b90 zfs:traverse_segment+410 ()
ffffff00050b1be0 zfs:traverse_more+74 ()
ffffff00050b1c60 zfs:spa_scrub_thread+219 ()
ffffff00050b1c70 unix:thread_start+8 ()

So for now this fix is just focusing on the current needs of crypto.  I've
brought up the issue for discussion with the ZFS team.

-- 
Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Reply via email to