Alexander Motin 0d1f3b1c60 RAIDZ: Fix parity regeneration/check condition
Profiling RAIDZ1/dRAID1 resilver I've noticed that they calculate
the parity twice for most of blocks: first to reconstruct the data
column and then to "verify" the parity column.  Same time it is
obvious that parity generated from data reconstructed from the
parity will be identical to the original.  The code even had this
condition, but it was overridden by ZIO_FLAG_RESILVER check.

I think the ZIO_FLAG_RESILVER condition is not right.  Instead we
should check for parity_errors > 0, when we failed to read some
parity columns that we'll need to rewrite.  It should not matter
if we are resilvering or just doing self healing on regular read.

Profiling shows this saving ~16% of ZFS CPU time when resilvering
RAIDZ1.  RAIDZ2+ are out of luck, unless two disks are replaced
same time, since there is still a parity to verify.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Alexander Motin <[email protected]>
Closes #18707
2026-06-29 15:23:23 -07:00
2026-06-24 16:00:31 -07:00
2026-06-04 16:45:13 -07:00
2026-06-04 16:45:13 -07:00
2022-12-22 11:34:28 -08:00
2020-06-09 21:24:09 -07:00
2018-05-29 16:00:33 -07:00
2026-05-22 13:29:30 -07:00
2026-06-17 09:45:38 -07:00
2020-08-26 21:44:41 -07:00
2018-05-29 16:00:33 -07:00
2020-03-16 10:46:03 -07:00

img

OpenZFS is an advanced file system and volume manager which was originally developed for Solaris and is now maintained by the OpenZFS community. This repository contains the code for running OpenZFS on Linux and FreeBSD.

codecov coverity

Official Resources

Installation

Full documentation for installing OpenZFS on your favorite operating system can be found at the Getting Started Page.

Contribute & Develop

We have a separate document with contribution guidelines.

We have a Code of Conduct.

Release

OpenZFS is released under a CDDL license. For more details see the NOTICE, LICENSE and COPYRIGHT files; UCRL-CODE-235197

Supported Kernels and Distributions

Linux

Given the wide variety of Linux environments, we prioritize development and testing on stable, supported kernels and distributions.

Kernel (kernel.org)

All longterm kernels from kernel.org are supported. stable kernels are usually supported in the next OpenZFS release.

Supported longterm kernels: 6.18, 6.12, 6.6, 6.1, 5.15, 5.10.

Red Hat Enterprise Linux (RHEL)

All RHEL (and compatible systems: AlmaLinux OS, Rocky Linux, etc) on the full or maintenance support tracks are supported.

Supported RHEL releases: 8.10, 9.7, 10.1.

Ubuntu

All Ubuntu LTS releases are supported.

Supported Ubuntu releases: 26.04 “Resolute”, 24.04 “Noble”, 22.04 “Jammy”.

Debian

All Debian stable and LTS releases are supported.

Supported Debian releases: 13 “Trixie”, 12 “Bookworm”, 11 “Bullseye”.

Other Distributions

Generally, if a distribution is following an LTS kernel, it should work well with OpenZFS.

FreeBSD

All FreeBSD releases receiving security support are supported by OpenZFS.

Supported FreeBSD releases: 15.1, 14.4.

S
Description
No description provided
Readme
4 GiB
0 Stars 1 Watchers 0 Forks
Languages
C 59.9%
C++ 26.8%
Roff 4.5%
Shell 2.8%
Assembly 1.7%
Other 3.7%