]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
md/raid: raid5 preserve the writeback action after the parity check
authorNigel Croxon <ncroxon@redhat.com>
Tue, 16 Apr 2019 16:50:09 +0000 (09:50 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 22 Nov 2019 15:57:32 +0000 (15:57 +0000)
commit31e2808f4dd3759d4cfe8369295624aa063ee3eb
tree436ae7ddad4be3864787f464daa18fbbcca125c1
parentbc2152267439591e5d7cfc55a567eb4afb4d08f1
md/raid: raid5 preserve the writeback action after the parity check

commit b2176a1dfb518d870ee073445d27055fea64dfb8 upstream.

The problem is that any 'uptodate' vs 'disks' check is not precise
in this path. Put a "WARN_ON(!test_bit(R5_UPTODATE, &dev->flags)" on the
device that might try to kick off writes and then skip the action.
Better to prevent the raid driver from taking unexpected action *and* keep
the system alive vs killing the machine with BUG_ON.

Note: fixed warning reported by kbuild test robot <lkp@intel.com>

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Nigel Croxon <ncroxon@redhat.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/md/raid5.c