No description
Find a file
David Jeffery c467e97f07 md/raid6: use valid sector values to determine if an I/O should wait on the reshape
During a reshape or a RAID6 array such as expanding by adding an additional
disk, I/Os to the region of the array which have not yet been reshaped can
stall indefinitely. This is from errors in the stripe_ahead_of_reshape
function causing md to think the I/O is to a region in the actively
undergoing the reshape.

stripe_ahead_of_reshape fails to account for the q disk having a sector
value of 0. By not excluding the q disk from the for loop, raid6 will always
generate a min_sector value of 0, causing a return value which stalls.

The function's max_sector calculation also uses min() when it should use
max(), causing the max_sector value to always be 0. During a backwards
rebuild this can cause the opposite problem where it allows I/O to advance
when it should wait.

Fixing these errors will allow safe I/O to advance in a timely manner and
delay only I/O which is unsafe due to stripes in the middle of undergoing
the reshape.

Fixes: 486f605586 ("md/raid5: Check all disks in a stripe_head for reshape progress")
Cc: stable@vger.kernel.org # v6.0+
Signed-off-by: David Jeffery <djeffery@redhat.com>
Tested-by: Laurence Oberman <loberman@redhat.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20231128181233.6187-1-djeffery@redhat.com
2023-12-01 14:43:29 -08:00
arch parisc architecture fixes for kernel v6.7-rc1 (part 2): 2023-11-12 11:05:31 -08:00
block blk-cgroup: bypass blkcg_deactivate_policy after destroying 2023-11-17 10:48:58 -07:00
certs
crypto
Documentation Probes fixes for v6.7-rc1: 2023-11-10 16:35:04 -08:00
drivers md/raid6: use valid sector values to determine if an I/O should wait on the reshape 2023-12-01 14:43:29 -08:00
fs Sixteen smb3/cifs client fixes 2023-11-11 17:17:22 -08:00
include Probes fixes for v6.7-rc1: 2023-11-10 16:35:04 -08:00
init
io_uring
ipc
kernel Probes fixes for v6.7-rc1: 2023-11-10 16:35:04 -08:00
lib
LICENSES
mm
net
rust
samples
scripts
security
sound
tools LoongArch changes for v6.7 2023-11-12 10:58:08 -08:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile Linux 6.7-rc1 2023-11-12 16:19:07 -08:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.