]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid1: fix writebehind bio clone
authorShaohua Li <shli@fb.com>
Mon, 17 Jul 2017 21:33:48 +0000 (14:33 -0700)
committerShaohua Li <shli@fb.com>
Fri, 21 Jul 2017 19:47:20 +0000 (12:47 -0700)
commit37f7c05f0ac3c0ee5960d39c5d0c3b0fec85585c
treeead4908160acc2c9192c78898f1f5ec8062d231d
parent85dcb23b256e97a64d6b034a619457efcdb6eff0
md/raid1: fix writebehind bio clone

After bio is submitted, we should not clone it as its bi_iter might be
invalid by driver. This is the case of behind_master_bio. In certain
situration, we could dispatch behind_master_bio immediately for the
first disk and then clone it for other disks.

https://bugzilla.kernel.org/show_bug.cgi?id=196383

Reported-and-tested-by: Markus <m4rkusxxl@web.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Fix: 6abce8bd79d4(md: raid1: improve write behind)
Cc: stable@vger.kernel.org (4.12+)
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/raid1.c