diff options
author | mav <mav@FreeBSD.org> | 2015-01-26 16:29:07 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-01-26 16:29:07 +0000 |
commit | 58f009f0d3cc76f70ad35798c4572a91248e5a6f (patch) | |
tree | 86fbf22a99afcc6e1a977a4c997cec82c61ba434 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c | |
parent | c46b18f753630842dacd0134e3fd1b1dde1ecbc0 (diff) | |
download | FreeBSD-src-58f009f0d3cc76f70ad35798c4572a91248e5a6f.zip FreeBSD-src-58f009f0d3cc76f70ad35798c4572a91248e5a6f.tar.gz |
MFC r277096: Skip extra bcopy() when scrubbing vdev without redundancy.
According to profiler, this bcopy() can use about 10% of CPU time.
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c index b69dfdd..9d22d1e 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c @@ -441,7 +441,8 @@ vdev_mirror_io_start(zio_t *zio) mm = vdev_mirror_map_init(zio); if (zio->io_type == ZIO_TYPE_READ) { - if ((zio->io_flags & ZIO_FLAG_SCRUB) && !mm->mm_replacing) { + if ((zio->io_flags & ZIO_FLAG_SCRUB) && !mm->mm_replacing && + mm->mm_children > 1) { /* * For scrubbing reads we need to allocate a read * buffer for each child and issue reads to all |