Tom Caputi 440a3eb939 Fixes for #6639
Several issues were uncovered by running stress tests with zfs
encryption and raw sends in particular. The issues and their
associated fixes are as follows:

* arc_read_done() has the ability to chain several requests for
  the same block of data via the arc_callback_t struct. In these
  cases, the ARC would only use the first request's dsobj from
  the bookmark to decrypt the data. This is problematic because
  the first request might be a prefetch zio which is able to
  handle the key not being loaded, while the second might use a
  different key that it is sure will work. The fix here is to
  pass the dsobj with each individual arc_callback_t so that each
  request can attempt to decrypt the data separately.

* DRR_FREE and DRR_FREEOBJECT records in a send file were not
  having their transactions properly tagged as raw during raw
  sends, which caused a panic when the dbuf code attempted to
  decrypt these blocks.

* traverse_prefetch_metadata() did not properly set
  ZIO_FLAG_SPECULATIVE when issuing prefetch IOs.

* Added a few asserts and code cleanups to ensure these issues
  are more detectable in the future.

Signed-off-by: Tom Caputi <tcaputi@datto.com>
2017-10-11 16:55:50 -04:00
..
2017-10-06 11:23:12 -07:00
2017-10-11 16:55:50 -04:00
2015-01-16 14:41:26 -08:00
2017-05-26 11:42:10 -07:00
2017-08-14 10:36:48 -07:00
2017-06-26 14:36:49 -07:00
2017-10-11 16:55:50 -04:00
2015-01-16 14:41:26 -08:00
2017-08-14 10:36:48 -07:00
2017-10-11 16:54:48 -04:00
2017-10-11 16:55:50 -04:00
2017-10-11 16:55:50 -04:00
2017-09-20 09:30:24 -07:00
2017-10-11 16:55:50 -04:00
2017-10-11 16:54:48 -04:00
2017-08-14 10:36:48 -07:00
2017-08-14 10:36:48 -07:00
2017-08-14 10:36:48 -07:00
2017-10-11 16:54:48 -04:00
2015-01-16 14:41:26 -08:00
2017-10-11 16:54:48 -04:00
2017-10-11 16:53:37 -04:00
2016-04-21 09:49:25 -07:00
2017-01-03 11:31:18 -06:00
2017-10-10 16:41:47 -07:00
2010-08-31 13:41:58 -07:00
2017-08-14 10:36:48 -07:00
2017-07-13 13:54:00 -04:00
2017-08-21 10:05:16 -07:00
2016-11-29 14:34:33 -08:00
2017-08-14 10:36:48 -07:00
2017-08-08 08:38:53 -07:00
2017-08-14 10:36:48 -07:00
2017-08-14 10:36:48 -07:00
2010-08-31 13:41:58 -07:00
2017-03-10 09:51:33 -08:00
2017-08-14 10:36:48 -07:00
2017-03-10 09:51:33 -08:00
2017-08-09 15:31:08 -07:00
2017-01-03 11:31:18 -06:00
2017-10-11 16:55:50 -04:00
2017-09-19 12:19:08 -07:00
2017-10-11 16:54:48 -04:00
2017-10-11 16:54:48 -04:00
2017-10-11 16:54:48 -04:00
2017-09-19 12:19:08 -07:00
2017-03-10 09:51:41 -08:00
2017-01-23 10:35:58 -08:00