]> granicus.if.org Git - zfs/commit
Decryption error handling improvements
authorTom Caputi <tcaputi@datto.com>
Sat, 31 Mar 2018 18:12:51 +0000 (14:12 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Sat, 31 Mar 2018 18:12:51 +0000 (11:12 -0700)
commita2c2ed1bd4c3dc6d52b6058b9c74245cad2ae331
treede5ad1fd1bc04f0ee496316305871d0b0e26d74e
parent4515b1d01c936b8cf156e20ba42cdb8916bca80b
Decryption error handling improvements

Currently, the decryption and block authentication code in
the ZIO / ARC layers is a bit inconsistent with regards to
the ereports that are produces and the error codes that are
passed to calling functions. This patch ensures that all of
these errors (which begin as ECKSUM) are converted to EIO
before they leave the ZIO or ARC layer and that ereports
are correctly generated on each decryption / authentication
failure.

In addition, this patch fixes a bug in zio_decrypt() where
ECKSUM never gets written to zio->io_error.

Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #7372
include/sys/arc.h
include/sys/spa.h
include/sys/zio.h
module/zfs/arc.c
module/zfs/dbuf.c
module/zfs/dmu_objset.c
module/zfs/dmu_send.c
module/zfs/zfs_fm.c
module/zfs/zio.c