Skip extra bcopy() when scrubbing vdev without redundancy.

According to profiler, this bcopy() can use about 10% of CPU time.

MFC after:	2 weeks
This commit is contained in:
Alexander Motin 2015-01-12 22:38:55 +00:00
parent 7e310d2d50
commit 5b3a65823d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=277096

View File

@ -435,7 +435,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