Tim Chase 0902c4577f Fix ARC stats for embedded blkptrs
Re-factor arc_read() to better account for embedded data blkptrs.
Previously, reading the payload from an embedded blkptr would cause
arcstats such as demand_metadata_misses to be bumped when there was
actually no cache "miss" because the data are already available in
the blkptr.

The following test procedure was used to demonstrate the problem:

   zpool create tank ...
   zfs create -o compression=lz4 tank/fs
   echo blah > /tank/fs/blah
   stat /tank/fs/blah
   grep 'meta.*mis' /proc/spl/kstat/zfs/arcstats

and repeating the last two steps to watch the metadata miss counter
increment.  This can also be demonstrated via the  zfs_arc_miss DTRACE4
probe in arc_read().

Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
Reviewed-by: George Wilson <george.wilson@delphix.com>
Reviewed-by: Matt Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Tim Chase <tim@chase2k.com>
Closes #8319
2019-02-04 09:33:30 -08:00
..
2018-10-01 10:42:05 -07:00
2019-02-04 09:33:30 -08:00
2015-01-16 14:41:26 -08:00
2017-08-14 10:36:48 -07:00
2017-06-26 14:36:49 -07:00
2018-05-29 16:00:33 -07:00
2019-01-17 15:25:00 -08:00
2018-05-01 11:24:20 -07:00
2018-10-16 11:15:04 -07:00
2018-10-16 11:15:04 -07:00
2018-08-15 09:53:44 -07:00
2018-05-29 16:00:33 -07:00
2018-10-16 11:15:04 -07:00
2018-10-16 11:15:04 -07:00
2018-05-29 16:00:33 -07:00
2018-05-29 16:00:33 -07:00
2018-05-29 16:00:33 -07:00
2017-10-11 16:54:48 -04:00
2015-01-16 14:41:26 -08:00
2018-05-29 16:00:33 -07:00
2018-05-29 16:00:33 -07:00
2018-03-15 10:53:58 -07:00
2018-10-01 10:42:05 -07:00
2018-03-15 10:53:58 -07:00
2010-08-31 13:41:58 -07:00
2018-05-29 16:00:33 -07:00
2018-10-24 14:37:02 -07:00
2018-05-29 16:00:33 -07:00
2018-11-11 18:09:00 -08:00
2016-11-29 14:34:33 -08:00
2019-01-31 09:17:52 -08:00
2019-01-31 09:17:52 -08:00
2018-05-29 16:00:33 -07:00
2018-10-17 10:30:08 -07:00
2018-05-29 16:00:33 -07:00
2018-05-29 16:00:33 -07:00
2018-05-29 16:00:33 -07:00
2018-05-29 16:00:33 -07:00
2018-02-13 14:54:54 -08:00
2018-10-17 10:31:38 -07:00
2018-05-29 16:00:33 -07:00
2019-01-13 10:11:52 -08:00
2018-02-09 10:08:05 -08:00
2018-08-27 10:04:21 -07:00
2018-05-29 16:00:33 -07:00