]> git.baikalelectronics.ru Git - kernel.git/commit
md: do not compute parity unless it is on a failed drive
authorDan Williams <dan.j.williams@intel.com>
Fri, 6 Jun 2008 05:45:54 +0000 (22:45 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Jun 2008 18:29:08 +0000 (11:29 -0700)
commitc3211acb682f09ac025ae95e66cb4b775d685d9d
tree786cdf119ce33641438cd841deb0c480dd92f900
parentc48240385b36c7de97f3875ce4d33e84f6421957
md: do not compute parity unless it is on a failed drive

If a block is computed (rather than read) then a check/repair operation
may be lead to believe that the data on disk is correct, when infact it
isn't.  So only compute blocks for failed devices.

This issue has been around since at least 2.6.12, but has become harder to
hit in recent kernels since most reads bypass the cache.

echo repair > /sys/block/mdN/md/sync_action will set the parity blocks to the
correct state.

Cc: <stable@kernel.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/md/raid5.c