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-08-14 10:36:48 -07:00
2017-08-14 10:36:48 -07:00
2017-06-30 11:11:01 -07:00
2017-10-11 16:55:50 -04:00
2017-09-29 15:49:19 -07:00
2017-10-05 19:28:00 -07:00
2016-01-08 15:08:19 -08:00
2017-08-14 10:36:48 -07:00
2017-08-14 10:36:48 -07:00
2017-10-11 16:55:50 -04:00
2014-07-29 10:55:29 -07:00
2017-08-14 10:36:48 -07:00
2017-08-14 10:36:48 -07:00
2013-11-04 11:18:14 -08:00
2017-08-14 10:36:48 -07:00
2017-08-14 10:36:48 -07:00
2013-11-04 11:17:48 -08:00
2017-01-03 11:31:18 -06:00
2017-10-11 16:54:48 -04:00
2017-10-11 16:54:48 -04:00
2017-07-25 13:22:20 -04:00
2014-08-13 10:35:00 -07:00
2016-04-21 09:49:25 -07:00
2016-06-07 09:16:52 -07:00
2014-07-30 09:20:35 -07:00
2016-06-24 13:13:21 -07:00
2016-12-01 16:39:06 -07:00
2017-08-14 10:36:48 -07:00
2015-01-06 16:53:24 -08:00
2017-01-03 11:31:18 -06:00
2017-07-13 13:54:00 -04:00
2011-02-10 09:21:43 -08:00
2013-11-04 10:55:25 -08:00
2017-08-21 10:05:16 -07:00
2017-08-21 10:05:16 -07:00
2017-01-03 11:31:18 -06:00
2017-03-10 09:51:33 -08:00
2017-03-10 09:51:33 -08:00
2013-12-18 16:46:35 -08:00
2017-03-10 09:51:33 -08:00
2017-03-10 09:51:33 -08:00
2017-08-23 16:54:24 -07:00
2017-03-10 09:51:33 -08:00
2017-03-10 09:51:35 -08:00
2017-03-10 09:51:33 -08:00
2017-08-14 10:36:48 -07:00
2017-03-29 12:24:51 -07:00
2017-10-11 16:54:48 -04:00
2017-08-14 10:36:48 -07:00
2016-12-12 10:46:26 -08:00
2017-07-12 13:05:37 -07:00