]> git.baikalelectronics.ru Git - kernel.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)
committerSong Liu <songliubraving@fb.com>
Tue, 16 Apr 2019 21:33:18 +0000 (14:33 -0700)
commit338e6355f62399ad4c53dff4c89fcc5e747bb636
tree0d95541e3b7f29186b6a837a7746a294c59f62bb
parent967d7649a341eca6953f752cdc6b4fb3e25bcdb2
md/raid: raid5 preserve the writeback action after the parity check

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>
drivers/md/raid5.c