diff options
author | Tony Hutter <hutter2@llnl.gov> | 2016-08-01 17:32:18 -0700 |
---|---|---|
committer | Brian Behlendorf <behlendorf1@llnl.gov> | 2016-08-02 08:45:24 -0700 |
commit | 4eb0db42d30b2ea8bed018f2227ebafd3ce35c9c (patch) | |
tree | c96c8a2976c9fbb27be0b07b7b8ee7334c3c4768 /module | |
parent | e24e62a948e1519fb4c1bfc40d9d51e36fbbe63e (diff) |
Fix possible VDEV stats array overflow
Fix a possible VDEV statistics array overflow when ZIOs with
ZIO_PRIORITY_NOW complete.
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #4883
Closes #4917
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/vdev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c index 302458b73..0178bfdec 100644 --- a/module/zfs/vdev.c +++ b/module/zfs/vdev.c @@ -2982,7 +2982,8 @@ vdev_stat_update(zio_t *zio, uint64_t psize) * The bytes/ops/histograms are recorded at the leaf level and * aggregated into the higher level vdevs in vdev_get_stats(). */ - if (vd->vdev_ops->vdev_op_leaf) { + if (vd->vdev_ops->vdev_op_leaf && + (zio->io_priority < ZIO_PRIORITY_NUM_QUEUEABLE)) { vs->vs_ops[type]++; vs->vs_bytes[type] += psize; |